Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.2.1 - NDK r10e sync fail?

I have a project created by Android Studio version 3.1.3 and Gradle version 4.4.1. It contains some native code and runs well with NDK r10e. Yesterday I upgraded my Android Studio to version 3.2.1 (it required Gradle version 4.6 so I updated it on Gradle wrapper too). But after the upgrade process done, Gradle sync fails with this error :

Parameter specified as non-null is null: method com.android.build.gradle.internal.cxx.configure.JsonGenerationVariantConfiguration., parameter ndkVersion

My NDK location still points to my NDK r10e directory. I can not change it to a higher NDK version because it will occur many other errors.

What should I do? Please help.

like image 535
Công Hảo Nguyễn Avatar asked Nov 04 '25 14:11

Công Hảo Nguyễn


1 Answers

I had a hard time because of this problem. The solution was surprisingly simple.

  1. Download NDK version 11 or higher
  2. Copy the source.properties from the downloaded NDK root folder and paste it into the NDK r10e folder
  3. Modify the source.properties Pkg.Revision to match the x.y.z format (optional)
like image 174
Sean Avatar answered Nov 07 '25 10:11

Sean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!