本文主要是介绍微博分享 Couldn't load weibosdkcore from loader dalvik.system,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
解决办法
在libs下新建armeabi-v7a文件夹,把libweibosdkcore.so拷贝进去
再在build.gradle 的 android里添加
//noinspection all
task copyNativeLibs(type: Copy) {
// third party lib so
from(new File(projectDir, 'libs')) { include 'armeabi/*.so','armeabi-v7a/*.so' }
into new File(buildDir, 'native-libs')
}
tasks.withType(JavaCompile) {
compileTask ->
//noinspection all
compileTask.dependsOn copyNativeLibs
}
//noinspection all
tasks.withType(com.android.build.gradle.tasks.PackageApplication) {
pkgTask ->
pkgTask.jniFolders = new HashSet()
pkgTask.jniFolders.add(new File(buildDir, 'native-libs'))
}
这篇关于微博分享 Couldn't load weibosdkcore from loader dalvik.system的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!