我正在使用andengine和box2d扩展来制作简单的Android应用程序。 不幸的是,我收到了这条消息:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/es.esy.m3na71jnu5cg5e2.gs14049_bsj_mid-2/base.apk"],nativeLibraryDirectories= [/data/app/es.esy.m3na71jnu5cg5e2.gs14049_bsj_mid-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libandenginephysicsbox2dextension.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at org.andengine.extension.physics.box2d.PhysicsWorld.<clinit>(PhysicsWorld.java:35)
at es.esy.m3na71jnu5cg5e2.gs14049_bsj_mid.PvPActivity.onCreate(PvPActivity.java:70)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3207)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350)
at android.app.ActivityThread.access$1100(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7237)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
我根据其他答案添加了.so文件,但我无法解决这个问题。 directory
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
ndk {
abiFilters "armeabi-v7a", "x86", "armeabi"
}
applicationId "es.esy.m3na71jnu5cg5e2.gs14049_bsj_mid"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile files('libs/org_andengine_extension_physics_box2d.jar')
compile files('libs/org_andengine.jar')
compile files('libs/lib.jar')
}
请帮助