[英]nativeLibraryDir appears empty after updating to Gradle 5.6.4 and Android Studio 3.6.1
It appears that my libraries no longer exist in nativeLibraryDir after updating Gradle from 5.4.1 to 5.6.4 and Android Studio from 3.5.3 to 3.6.1.在将 Gradle 从 5.4.1 更新到 5.6.4 并将 Android Studio 从 3.5.3 更新到 3.6.1 之后,我的库似乎不再存在于 nativeLibraryDir 中。 My current implementation for accessing my libraries is as follows:
我当前访问我的库的实现如下:
File libDirectory = new File(context.getApplicationInfo().nativeLibraryDir);
String files[] = libDirectory.list();
I also encountered this problem, and I finally solved it by :我也遇到了这个问题,最后通过以下方式解决了:
// AndroidManifest.xml
<application
...
android:extractNativeLibs="true"
...
>
when extractNativeLibs
set to true
, so files
copy to lib/xxx
folder.当
extractNativeLibs
设置为true
, so files
复制到lib/xxx
文件夹。
It works.有用。 Saved my day,Thank you!
拯救了我的一天,谢谢!
use this version使用这个版本
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
}
with Gradle 5.6.4使用 Gradle 5.6.4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.