Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aarch64-linux-android-strip file Missing

I updated to Android studio 2.3 and my project got these errors

Error:org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'C:\Users\...\AppData\Local\Android\sdk\ndk-bundle\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin\aarch64-linux-android-strip''   Error:net.rubygrapefruit.platform.NativeException: Could not start 'C:\Users\...\AppData\Local\Android\sdk\ndk-bundle\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin\aarch64-linux-android-strip'   Error:java.io.IOException: Cannot run program "C:\Users\...\AppData\Local\Android\sdk\ndk-bundle\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin\aarch64-linux-android-strip" (in directory "E:\projectNmame\app"): CreateProcess error=2, The system cannot find the file specified 

Can anyone help me to fix this? I'm stuck on this issue.

like image 750
Hanzala Avatar asked Mar 11 '17 19:03

Hanzala


2 Answers

I have Android Studio 3.1.2 and after I approved the IDE suggested updates I got the next errors:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task '...'.  Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/Users/.../Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip'  Caused by: net.rubygrapefruit.platform.NativeException: Could not start '/Users/.../Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip'  Caused by: java.io.IOException: Cannot run program "/Users/.../Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip" (in directory "/Users/.../.../.../app"): error=2, No such file or directory  Caused by: java.io.IOException: error=2, No such file or directory 

It looks like there is a problem with NDK version 17.0.4754217.

Since I don't use ndk components in my project for me the solution was removing NDK from the SDK Manager.

Go to SDK Manager -> SDK Tools tab -> uncheck NDK -> Apply.

enter image description here

like image 139
CookieMonster Avatar answered Sep 19 '22 03:09

CookieMonster


I had the same problem when using NDK version 17.0.4754217 (maybe on newer versions, it doesn't happen). You can workaround this issue by adding the following code in your gradle.build:

packagingOptions{     doNotStrip '*/mips/*.so' } 

Or

packagingOptions{     doNotStrip '*/mips/*.so'     doNotStrip '*/mips64/*.so' } 

If you are using native code (C++), I recommend add the following code too:

ndk {     abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' // <- only the supported ones } 

To make sure you won't embed any MIPS binary.

like image 41
Lucas Lima Avatar answered Sep 21 '22 03:09

Lucas Lima