Gokit Demo App 无法用AVD打开,报错“java.lang.UnsatisfiedLinkError...
我是win10 64 bit,用的AS编译Gokit Demo, 编译没有问题,一用avd运行就出错。原因是libs只有armeabi的,没有x86的,是不是不能用AVD调试?
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.gizwits.opensource.appkit, PID: 4666
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.gizwits.opensource.appkit-ubci3lD0tsN2-L02KVwBtw==/lib/x86/libSDKLog.so" has unexpected e_machine: 40 (EM_ARM)
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1657)
at com.gizwits.gizwifisdk.log.SDKLog.<clinit>(SDKLog.java:12)
at com.gizwits.gizwifisdk.log.SDKLog.d(SDKLog.java:213)
at com.gizwits.gizwifisdk.api.SDKEventManager.setListener(SDKEventManager.java:116)
at com.gizwits.gizwifisdk.api.GizWifiSDK.setListener(GizWifiSDK.java:52)
at com.gizwits.opensource.appkit.UserModule.GosUserModuleBaseActivity.onResume(GosUserModuleBaseActivity.java:118)
at com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity.onResume(GosUserLoginActivity.java:170)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I/zygote: JIT allocated 71KB for compiled code of void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
I/zygote: Compiler allocated 4MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
本帖最后由 Gclouder 于 2018-7-26 23:46 编辑
我用华为荣耀怎么也出错?
$ adb shell am start -n "com.gizwits.opensource.appkit/com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 3493 on device huawei-pe_tl00m-
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4199ac50)
有人成功编译过Gokit Demo 用AS么?
我的build.gradle:
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
splits {
abi {
enable true
reset()
include 'x86', 'armeabi', 'armeabi-v7a'
universalApk true
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
defaultConfig {
applicationId "com.gizwits.opensource.appkit"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
ndk{
abiFilters("armeabi", "armeabi-v7a", "x86") }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// compile 'com.android.support:appcompat-v7:23.4.0'
compile files('libs/BLEasyConfig.jar')
compile files('libs/easylink2.0.jar')
compile files('libs/hiflying-iots-android-smartlink7.0.2.jar')
compile files('libs/GizWifiSDK.jar')
compile files('libs/jpush-android-2.1.5.jar')
compile files('libs/Lark7618SDK_noudp1606031910_0101.jar')
compile files('libs/libammsdk.jar')
compile files('libs/libEsptouch_v0.3.3.4_3.jar')
compile files('libs/libForEElink.jar')
compile files('libs/LSFSK_1.0.jar')
compile files('libs/mta-sdk-1.6.2.jar')
compile files('libs/OneShotConfig.jar')
compile files('libs/open_sdk_r5756.jar')
compile files('libs/pushservice-5.0.0.66.jar')
compile files('libs/simpleconfigwizardlib.jar')
compile files('libs/xUtils-2.6.14.jar')
compile files('libs/zxing.jar')
compile 'com.yanzhenjie:permission:1.0.5'
}
没人回复?还是问题太小白了呢:L:L:L 。。。。木有人回答,下载到手机就运行不了,难道我手机太老了,:(。。。 尝试更换手机进行调试,可能是不兼容导致的 boboP 发表于 2018-8-2 17:09
尝试更换手机进行调试,可能是不兼容导致的
好的,谢谢!
页:
[1]