gogoWebsite

Android : couldn't find "

Updated to 2 days ago

.so files are often used to encapsulate or call them in projects, but they will fall into the pit accidentally. I encountered them once before, and this time I encountered them again. Take a note.

The exception is as follows. Sometimes, after you import the call rack package, there will still be problems and the prompt cannot be found:

: 
[DexPathList[
[zip file "/data/app/-1/"],
nativeLibraryDirectories=[/data/app/-1/lib/arm64, /data/app/-1/!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] 
couldn't find ""

This is because Android supports different platform types such as:

'armeabi' , 'armeabi-v7a' , 'arm64-v8a' , 'x86' , 'x86_64', but sometimes we will not add the package to import to each file, so the problem is. We all know that 'x86' is mostly used for tablets, 'x86_64' is mostly used for 64-bit tablets, 'armeabi' 5th and 6th generation ARM processors, mostly used for early mobile phones, 'armeabi-v7a' is an ARM processor of the 7th and above, currently most mobile phones use, 'arm64-v8a' is an ARM processor of the 8th and 64-bit ARM processors, and few devices use it.

Generally speaking, these are backward compatible, but this is the cause of the problem. When we have these files, and we have to import the shelf package in other files and only partially import it in 'arm64-v8a', then when we run the program, we will have the situation of couldn't find "" because we did not go to the file where the shelf package is located.

It is also very simple to solve the problem. You just need to add a shelf package to each file. If it does not exist or does not exist, you can copy and import it directly from the existing file.

But this will make it easier for files that we cannot use. If packaged, the apk will be very large. So in general, we only need to keep all the files and use them according to the actual situation. Generally, we can keep the 'armeabi-v7a' folder to be compatible with most mobile phones, or we can also add filters to the app's files.

defaultConfig {
        minSdkVersion 19
        targetSdkVersion 28

         'armeabi-v7a'
    }

This way we can filter to other unwanted files and reduce the size of the packaged files.

Filtering we can add multiple files 'armeabi' , 'armeabi-v7a'