当前位置:   article > 正文

JNI NDK错误汇总

JNI NDK错误汇总
问题一:This app only has 32-bit [armeabi-v7a] native libraries.
解决:在app目录下的build.gradle的android结构里加上arm64-v8a,如下:
android {
  .......
  defaultConfig{
   ndk{ abiFilters 'armeabi-v7a', 'arm64-v8a' //abiFilters 'armeabi', 'armeabi-v7a' }
   packagingOptions { pickFirst 'lib/armeabi-v7a/libserial_port.so' }
  }
  ......
}
问题二:解决完问题一后出现More than one file was found with OS independent path 'lib/arm64-v8a/libserial_port.so'
解决:问题一的解决里 packagingOptions 里添加 pickFirst 'lib/arm64-v8a/libserial_port.so',如下,
packagingOptions {
    pickFirst 'lib/armeabi-v7a/libserial_port.so'
    pickFirst 'lib/arm64-v8a/libserial_port.so'
}
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/477700
推荐阅读
相关标签
  

闽ICP备14008679号