Gradle build error: Gradle DSL method not found: 'uildscript()' - android-studio

Hey I am getting this error while running the app. Please can someone tell me how to fix it?
Error:(1, 0) Gradle DSL method not found: 'uildscript()' Possible
causes:The project 'ePulse2' may be using a version of Gradle
that does not contain the method. Open
Gradle wrapper fileThe build file may be missing a Gradle
plugin. Apply Gradle plugin

You have a typo: change uildscript to buildscript. Here are the docs.

Related

No incremental compile snapshot data available gradle error

I am launching a Gradle task and it gives me an error like No incremental compile snapshot data available. I've searched online and I can't find a sufficient description for this. Do you know what exactly raises this error?
What gradle version are you using, found an old bug in v4.10: https://github.com/gradle/gradle/issues/6612
My project is using gradle 4.10 version. However, gradlew.bat clean build --refresh-dependencies solved this problem for me.
By Deleting the .gradle folder of Android Project.
Then do gradle sync and build apk.
It will solve this problem

Kotlin app build failed due to "Could not initialize class com.intellij.ide.highlighter.JavaFileType"

I've just updated Android Studio to 2.2 and now my Kotlin project won't build. The gradle synch works fine, but when attempting to build I'm immediately presented with an error that reads:
Error:Execution failed for task ':app:compileDebugKotlin'.
> Could not initialize class com.intellij.ide.highlighter.JavaFileType
I've checked that my Kotlin plugin is up to date. This error sounds like something to do with the IDE and highlighting Java code? Any help would be appreciated.
Open Tools | Kotlin | Configure Kotlin Plugin Updates in the main menu,
then choose Check for Updates. Be sure that yo're using Stable channel.
Close Android Studio, go to your project's directory, and delete build and app/build folders. Run Android Studio. Deleted folders would be recreated.
Hope it will help
In my case the kotlin plugin was not updated as #piotrek1543 said in other answer.
In addition to that the build.gradle had an old Kotlin version number 1.0.1-2 and the IntelliJ said in a warning on top of to switch to the current bundled version 1.0.4.
Now with the kotlin version like this the error is gone:
ext.kotlin_version = '1.0.4'

ARToolKit ARSimpleProj Error

When I open the ARSimpleProj in Android Studio and try to update the gradle version I get this message:
Failed to update the version of the Android Gradle plugin.
Please click 'OK' to perform a textual search and then update the build files manually.
After this, I'm getting this error:
Error:(58, 0) Gradle DSL method not found: 'android()'
Possible causes:
* The project 'ARSimpleProj' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Fix plugin version and sync project
* The project 'ARSimpleProj' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
* The build file may be missing a Gradle plugin. Apply Gradle plugin.
I tried removing the android->buildToolsVersion and dependencies tag from the top-level, build.gradle file (as indicated in the AS_Migration document) but still it doesn't work.
I finally make it work. When opening the project on the Android Studio, I select "Remind me later" to the Android Gradle Plugin Update recommendation. After this, I could execute and install the application on my cell phone.
Make sure you are using JDK 1.7 in Project Structure. I had problems when using the JDK 1.8 with ARToolkit for Android.

Android Studio Error fail to establish apply plugin com.android.application

Error:(1, 1) A problem occurred evaluating project ':app'.
Failed to apply plugin [id 'com.android.application']
Could not create plugin of type 'AppPlugin'.
Can anyone help me to solve this issue
Google releases a new build tool and old makes deprecated I think.
We used: classpath 'com.android.tools.build:gradle:2.0.0-alpha1'
but new version was released and this error occured.
Just replace previous with new version:
classpath 'com.android.tools.build:gradle:2.1.0-alpha5'
So check latest build tool from: http://tools.android.com/tech-docs/new-build-system
Stable build tool last version is (I think): classpath 'com.android.tools.build:gradle:1.5.0'

NDK for AndroidStudio

I follow this page to study "NDK setting under androidStudio".
http://www.shaneenishry.com/blog/2014/08/17/ndk-with-android-studio/
But I face an issue when I Config ndk with gradle.here is error message.
have anybody help me?
Error:(20, 0) Gradle DSL method not found: 'ndk()'
Possible causes:The project 'My Application' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
I had this problem and solved it by following the steps in this blog:
http://ph0b.com/new-android-studio-ndk-support/
and looking at the source code of this project:
https://github.com/googlesamples/android-ndk/tree/master/hello-jni
I hope that helps.

Resources