android - 如何在 Android Studio 中使用弃用的 NDK

标签 android

我试图在 .jniLibs 文件夹内的 Android Studio 项目中包含 .so 文件,但出现以下错误,我该如何克服它?

Error:Execution failed for task ':app:compileDebugNdk'. Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.

我在任何地方都找不到gradle.properties?我在哪里可以找到或有任何变通办法?

谢谢

最佳答案

在Android-Studio中,gradle.properties可以通过如下 View 下拉列表访问。 Drop Down Box in Android Studio

选择项目 View 后,展开项目名称并打开 gradle.properties 选项卡。 gradle.properties

在编辑器窗口输入

android.useDeprecatedNdk=true

现在,您将能够使用当前的 NDK。

关于android - 如何在 Android Studio 中使用弃用的 NDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33008699/

相关文章:

android - ListView 内部 fragment 错误

发出 Web 请求的 Android 服务线程正在阻塞 UI

android - 如何在 Galaxy Nexus 手机上设置电池电量

android - 当手机未充电时应用程序的服务停止

java - 发生 Firebase 身份验证注册错误

Android:打开从电子邮件客户端附件传递到 Activity 的文件查看 Intent

android - 在 jquery/javascript 中复制到剪贴板,没有 ipad/iphone 的 flash

android - ChromeOS 上的 Android 应用程序的侧加载和调试机制是什么?

java - Android,实际时间问题

android - Realm for Android – RealmResult.sort() 进行基于字符串的排序?