Reputation: 51
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.
Upvotes: 2
Views: 566
Reputation: 23015
Make sure you are using JDK 1.7
in Project Structure
. I had problems when using the JDK 1.8
with ARToolkit for Android.
Upvotes: 1
Reputation: 51
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.
Upvotes: 1