ExceptionInInitializerError Physics World

后端 未结 1 1355
星月不相逢
星月不相逢 2020-12-21 21:29

I searched in a number of forums and it seems to be a common question. However i couldnt find a solution. I didnt do anything crazy so it seems stange that this happens.

相关标签:
1条回答
  • 2020-12-21 22:02

    Probably native libraries (.so files from lib dir) is missing from your APK. Check your project settings / build configuration.

    If you're using android studio, you have to modify the sourceSet of andEngine and andEnginePhysicsBox2DExtension in build.gradle.

    You have a folder in that projects where there are so files, you need to include the native libraries from there.

    Check my answer here: jniLibs are not extended in gradle

    Update based on your comments:

    Add this to andEngine, andEnginePhysicsBox2d and your game build.gradle:

    sourceSets {
        main {
            jni.srcDirs = []
            jniLibs.srcDir 'libs'
        }
    }
    

    Also add this to the defaultConfig section, for andEngine:

    ndk {
       moduleName "andEngine"
    }
    

    and for andEnginePhysicsBox2d:

    ndk {
        moduleName "andEnginePhysicsBox2dExtension"
    }
    
    0 讨论(0)
提交回复
热议问题