android "*.so" is 32-bit instead of 64-bit 错误

1.在项目的根目录的gradle.properties里面添加一行代码android.useDeprecatedNdk=true.

2.在build.gradle文件里添加以下代码

android {

...

defaultConfig {

...

ndk {

abiFilters "armeabi-v7a", "x86"

}

        packagingOptions {

      exclude "lib/arm64-v8a/libserial_port.so"

}

}

}

你可能感兴趣的:(android "*.so" is 32-bit instead of 64-bit 错误)