After installing Ubuntu 18
in new desktop with i7 and 24gb ram . We try to move our android studio
project to new pc in zip format and our project
You should check Android Studio configuration on you old PC and compare version of every position in Android SDK > SDK Tools:
In my case the main problem was with Android NDK. Apparently I've installed update to version 17 and that was causing problems. So what I did:
[android-sdk]\ndk-bundle\
or uninstall Android NDK in Android Studio\Sdk tools (see on the image above)[android-sdk]\ndk-bundle\
Hope it helps.
Invalidate Caches and Restart fixed it for me.
go to File
> Invalidate Caches/Restart...
Hope it works for you.
Mips is not supported anymore in Android NDK r17. I had the same problem and in my case it was caused by a dependency which contains a prebuilt mips native lib. I was able to fix the build error by excluding the mips files as follows in the main build.gradle:
android {
packagingOptions {
exclude 'lib/mips64/NAME_OF_THE_LIB.so'
exclude 'lib/mips/NAME_OF_THE_LIB.so'
}
}
where NAME_OF_THE_LIB must be replaced by the actual name of the so file. You can find it by unzipping the apk of a previous successful build, if you have one.
Follow the below simple steps to fix this:
include this code in your build.gradle
defaultConfig {
packagingOptions{
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
}
}