Android Gradle Error: Could not find method jniLibs() for PackagingOptions
The error message 'Could not find method jniLibs() for arguments [build_195zezm53jh2k90zcm89f18cc$_run_closure2$_closure6$_closure11@1d1cda72] on object of type com.android.build.gradle.internal.dsl.PackagingOptions' indicates that the jniLibs() method is being called incorrectly within your Android Gradle build script.
The jniLibs() method is typically used within the android block of your Gradle script to specify the location of native libraries for your Android project. However, it's not a method available in the PackagingOptions object.
To resolve this issue, ensure that you're calling jniLibs() in the correct location within your build script. It should be nested within the android block, like this:
android {
// other configurations...
packagingOptions {
// other packaging options...
// Specify the location of native libraries
jniLibs {
// configuration options for jniLibs
}
}
}
If you intended to specify packaging options for native libraries, you might need to use a different method or approach depending on your specific requirements. Refer to the Android Gradle documentation for further guidance on packaging options and native library configuration.
原文地址: https://www.cveoy.top/t/topic/pd7Q 著作权归作者所有。请勿转载和采集!