下午手贱,原本好好的工程,非要去sdkManager里升级一下sdk tools。然后一直编译不过。。。下面是部分日志
Caused by: java.io.IOException: Cannot run program “F:\mine\android\sdk\ndk-bundle\toolchains\mipsel-linux-android-4.9\prebuilt\windows-x86_64\bin\mipsel-linux-android-strip” (in directory “E:\skyvpn\DingtoneAndroid\dingtoneApp”): CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
… 8 more
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 9 more
原因:
将ndk的版本升级到了r17,gradle 3.1.0新特性:
When building multiple APKs that each target a different ABI, the plugin no longer generates APKs for the following ABIs by default: mips, mips64, and armeabi.
If you want to build APKs that target these ABIs, you must use NDK r16b or lower and specify the ABIs in your build.gradle file, as shown below:
解决:
本来尝试去适配r17的ndk,奈何实在是太困难了。
于是将ndk的版本降回到r15,,ok,一切问题都解决了