錯誤日志:
"nativeLibraryDirectories=[/data/app/com.lukouapp-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libxxxx.so"
問題原因:64位機器默認去查找arm64-v8a目錄下是否有合適的64位庫,如果沒有則回去libs下查找32位的庫,而fresco的draw-pipeline太完善了考慮了64位的機器所以他的arm64-v8a下有so庫,對應的系統就創建了lib64的文件,而不再去找32位的庫。
解決辦法一:
*修改前:
Edit your build.gradle file as follows:
android {
// rest of your app's logic
splits {
abi {
enable true
reset() include 'x86', 'x86_64', 'arm64-v8a', 'armeabi-v7a', 'armeabi'
universalApk false
}
}
}
*修改后:
Edit your build.gradle file as follows:
android {
// rest of your app's logic
splits {
abi {
enable true
reset() include 'x86', 'x86_64', 'armeabi-v7a', 'armeabi'
universalApk false
}
}
}
注意:如果加入上面代碼還不行 ,可以注釋掉下面這行(如果你的主要工程目錄沒有加入lib和jar的話)
dependencies {
// compile fileTree(include: ['*.jar'], dir: 'libs')
}
解決辦法二:
也是通過修改gradle文件,
*修改前:
defaultConfig {
applicationId "com.richinfo.travel"
minSdkVersion 10
targetSdkVersion 22
versionCode 3
versionName "1.0.2"
buildConfigField "boolean", "LOG_DEBUG", "true"
consumerProguardFiles 'proguard-file.txt'
manifestPlaceholders =[UMENG_CHANNEL_VALUE: "local"]
}
*修改后:
defaultConfig {
applicationId "com.richinfo.travel"
minSdkVersion 14
targetSdkVersion 22
versionCode 3
versionName "1.0.2"
buildConfigField "boolean", "LOG_DEBUG", "true"
consumerProguardFiles 'proguard-file.txt'
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "local"]
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}}