Android Studio 即将弃用NDK编译

如果你的项目需要对NDK进行编译,并且你的gradle在3.0+

Execution failed for task ':app:compileDebugNdk'.

> Error: Flag android.useDeprecatedNdk is no longer supported and will be removed in the next version of Android Studio.  Please switch to a supported build system.

  Consider using CMake or ndk-build integration. For more information, go to:

  https://d.android.com/r/studio-ui/add-native-code.html#ndkCompile

  To get started, you can use the sample ndk-build script the Android

  plugin generated for you at:

  E:\workspase\SelfServiceCabinet\app\build\intermediates\ndk\debug\Android.mk

  Alternatively, you can use the experimental plugin:

  https://developer.android.com/r/tools/experimental-plugin.html

  To continue using the deprecated NDK compile for another 60 days, set

  android.deprecatedNdkCompileLease=1540986007490 in gradle.properties

出现这样的错误。错误说的很明白 。 即将不能使用 ,建议用CMake或者ndk-build插件 。。 

并且给了两个连接。 搭梯子 访问  https://d.android.com/r/studio-ui/add-native-code.html#ndkCompile

是google对如何适配新的编译环境

1.// Remove this line

android.useDeprecatedNdk = true

2.

下载相关插件SDK

未完,后补充

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 用两张图告诉你,为什么你的 App 会卡顿? - Android - 掘金 Cover 有什么料? 从这篇文章中你...
    hw1212阅读 12,913评论 2 59
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,217评论 25 708
  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    wgl0419阅读 6,349评论 1 9
  • Git 分支管理 几乎每一种版本控制系统都以某种形式支持分支。使用分支意味着你可以从开发主线上分离开来,然后在不影...
    史上头发最多的运维阅读 305评论 0 1
  • 午后的阳光!从窗户上斜照下来!是多么的舒服,惬意,
    wq坦然阅读 100评论 0 0