java - Android Studio 1.5 RC1编译NDK项目成功,运行的时候报错
PHP中文网
PHP中文网 2017-04-17 15:57:53
0
2
399
PHP中文网
PHP中文网

认证0级讲师

reply all(2)
洪涛

You should be using the simulator to run the apk, but the JNI part of your program does not generate corresponding code for the simulator's X86 architecture.

洪涛

You can try adding ndk and splits to build.grald in Model, for example:

android{
    ...
    defaultConfig {
    applicationId "XXXXXXX"
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 126
    versionName "1.2.6"
  
    ndk {
        //设置支持的SO库架构
        abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
        moduleName "app"
    }
    ....
    
    splits {
        abi {
            enable true
            reset()
            include 'x86', 'armeabi-v7a', 'mips'
            universalApk true
        }
    }
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template