After Using Android Studio 3.1.2 It Showing Error=2, No Such File Or Directory
Solution 1:
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:
- Remove everything from directory
[android-sdk]\ndk-bundle\
or uninstall Android NDK in Android Studio\Sdk tools (see on the image above) - Close Android Studio (AS).
- Download (in my case) NDK version 16b from https://developer.android.com/ndk/downloads/older_releases
- Extract archive (10 directories and 8 files or so) to
[android-sdk]\ndk-bundle\
- Start AS and perform full refresh: Build > Refresh Linked C++ projects and Build > Rebuild project.
Hope it helps.
Solution 2:
include this code in your build.gradle
defaultConfig {
packagingOptions{
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
}
}
Solution 3:
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.
Solution 4:
Follow the below simple steps to fix this:
- Close All opened file.
- Close Android Studio.
- After that, restart your mac, and rebuild your project from Android Studio.
Solution 5:
Invalidate Caches and Restart fixed it for me.
go to File
> Invalidate Caches/Restart...
Hope it works for you.
Post a Comment for "After Using Android Studio 3.1.2 It Showing Error=2, No Such File Or Directory"