Failed to load class com.android.build.gradle.managed.NdkConfig $ Impl

I just upgraded to AS 2.0 Preview 8, and I'm trying to create my old project. I updated it to be

classpath 'com.android.tools.build:gradle-experimental:0.6.0-alpha8' 

and updated gradle-wrapper.properties to use gradle-2.10-all.zip , but when I try to build my project, I get a Java stactrace statement:

 Unable to load class com.android.build.gradle.managed.NdkConfig$Impl 

I use Java 8 to run AS, and also to set up the JDK for the project. I also had a problem with Java7. What am I missing?

+5
source share
2 answers

Oddly enough, this has been fixed by simply doing Gradle clean . Hope this helps someone else as it was not intuitive.

+2
source

The problem with my project is related to changing the gradle-experimental plugin:

+ = no longer works for collections. Adding items to the list can be done using the add or addAll method. for example CFlags + = "-DCUSTOM_DEFINE" can be replaced with CFlags.add ("- DCUSTOM_DEFINE")

These entries are changed and assembly completed successfully.

+10
source

Source: https://habr.com/ru/post/1242231/


All Articles