1.android.useDeprecatedNdk=true

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.useDeprecatedNdk=true即可

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2.build.gradle少了配置

Warning:Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:
android {
sourceSets {
main {
jni.srcDirs = []
}
}
}
to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs.
make.exe: *** No rule to make target `E:\as_workspaces\IntentDemo\app\build\intermediates\ndk\debug\obj/local/armeabi-v7a/objs/app/E_\as_workspaces\IntentDemo\app\src\main\jni', needed by `E:\as_workspaces\IntentDemo\app\build\intermediates\ndk\debug\obj/local/armeabi-v7a/objs/app/E_\as_workspaces\IntentDemo\app\src\main\jni\JNI_Demo.o'. Stop.
:app:compileDebugNdk FAILED

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3.

make.exe: *** No rule to make target `E:\as_workspaces\IntentDemo\app\build\intermediates\ndk\debug\obj/local/armeabi-v7a/objs/JNI_Demo/E_\as_workspaces\IntentDemo\app\src\main\jni', needed by `E:\as_workspaces\IntentDemo\app\build\intermediates\ndk\debug\obj/local/armeabi-v7a/objs/JNI_Demo/E_\as_workspaces\IntentDemo\app\src\main\jni\JNI_Demo.o'. Stop.

Error:Execution failed for task ':app:compileDebugNdk'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\android-ndk-r10\ndk-build.cmd'' finished with non-zero exit value 2

-------------------------------------------------------------------------------

http://www.th7.cn/Program/Android/201509/550864.shtml

http://blog.csdn.net/lamp_zy/article/details/48976737

http://blog.k-res.net/archives/1788.html

http://www.cnblogs.com/flyme/p/4431762.html

http://blog.k-res.net/archives/1788.html

更多相关文章

  1. Android中各类.mk文件的编写
  2. android 在标题栏加上按钮
  3. 《Pro Android(安卓)Graphics》读书笔记之第四节
  4. Android:ADB各类错误
  5. android 按钮按下时改变字体颜色
  6. 设置android:elevation无效
  7. Android(安卓)webview与js交互
  8. android 背景圆角以及图片圆角处理
  9. Android(安卓)JetPack——DataBinding

随机推荐

  1. [LeetCode]题解(python):002-Add Two Number
  2. [置顶] Python-uiautomator使用说
  3. 从json获取最大插槽并应用于控制器
  4. 路飞学城Python-Day9(practise)
  5. Python学习笔记(十四)
  6. 彷徨中的成长-记一个文科生的IT成长过程
  7. Python note1(语言语义)
  8. 使用python实现菱形的两种方法
  9. javascript类定义与对象的性能
  10. Win7 64为Sublime Text3 配置python3的开