2

I have error after minor update Android Studio. Ubuntu 18.04, Android Studio 3.1.2

Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/private/Android/Sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/mips64el-linux-android-strip''


Caused by: net.rubygrapefruit.platform.NativeException: Could not start '/home/private/Android/Sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/mips64el-linux-android-strip'


Caused by: java.io.IOException: Cannot run program "/home/private/Android/Sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/mips64el-linux-android-strip" (in directory "/home/private/StudioProjects/yamatrack-cart-app-android/viewer"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
Fortran
  • 2,218
  • 2
  • 27
  • 33

2 Answers2

4

2 solution if you use an older gradle version

  1. don't use the latest ndk 17 because they have removed the mips build scripts
  2. copy the mips folder from ndk 16 under toolchain into ndk 17.

Second solution worked for me even with configured nbi filters.

mosh
  • 41
  • 4
2

I was getting this error when trying to build an older release of my code which was using an old version of the Android Gradle Plugin.

I found that upgrading to the latest Android Gradle plugin (3.1.2) fixed this. Although it is a bit worrying that I can't just checkout an older version of my code and build it with the plugin version from that release.

Although the build now appears to succeed with the newer Gradle plugin, I am getting this slightly worrying warning:

Unable to strip library 'MyApp/build/intermediates/transforms/mergeJniLibs/develop/debug/0/lib/mips/libsqlite3x.so' due to missing strip tool for ABI 'MIPS'. Packaging it as is.

I have this in my build.gradle as I depend on some native libs:

ndk {
    abiFilters "armeabi-v7a", "x86"
}
Graham Borland
  • 60,055
  • 21
  • 138
  • 179