java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLo

来源:互联网 发布:电脑制作漫画软件 编辑:程序博客网 时间:2024/05/20 00:17

今天写代码安装apk到手机遇到这个错误



解决:

"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
    }
  }
}


(*)注意上面的红色部分要删除掉最后看起来是这样:

android {
  // rest of your app's logic
  splits {
    abi {
        enable true
        reset()
        include 'x86', 'x86_64', 'armeabi-v7a', 'armeabi'
        universalApk false
    }
  }
}


0 0