[否规则,使目标"在Windows编译NDK源当摇篮 [英] "No rule to make target" when compiling NDK sources on Windows with Gradle

查看:245
本文介绍了[否规则,使目标"在Windows编译NDK源当摇篮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图包含来自源建立了一个NDK库基本的Andr​​oid应用程序。建设时,我得到了以下错误:

I am attempting a basic Android app containing an NDK library built from source. I get the following error when building :

gradlew assembleArm
:myapp:compileArmDebugNdk
make.exe: *** No rule to make target
`C:\Projects\MyApp\myapp\build\ndk\arm\debug\obj/local/armeabi-v7a/objs-debug/process/C_\Projects\MyApp\myapp\src\main\jni', needed by `C:\Projects\MyApp\myapp\build\ndk\arm\debug\obj/local/armeabi-v7a/objs-debug/process/C_\Projects\MyApp\myapp\src\main\jni\process.o'.  Stop.
:myapp:compileArmDebugNdk FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':myapp:compileArmDebugNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\android-ndk-r9d\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Projects\MyApp\myapp\build\ndk\arm\debug\Android.mk APP_PLATFORM=android-18 NDK_OUT=C:\Projects\MyApp\myapp\build\ndk\arm\debug\obj NDK_LIBS_OUT=C:\Projects\MyApp\myapp\build\ndk\arm\debug\lib NDK_DEBUG=1 APP_STL=stlport_static APP_ABI=armeabi-v7a

目标路径看起来很奇怪我。的gradle所产生的makefile文件看起来是这样的:

The target path looks odd to me. The makefile generated by gradle looks like this:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := process
LOCAL_CFLAGS := -DANDROID_NDK
LOCAL_SRC_FILES := \
C:\Projects\MyApp\myapp\src\main\jni\process.cpp \

LOCAL_C_INCLUDES += C:\Projects\MyApp\myapp\src\main\jni
LOCAL_C_INCLUDES += C:\Projects\MyApp\myapp\src\arm\jni
LOCAL_C_INCLUDES += C:\Projects\MyApp\myapp\src\debug\jni
LOCAL_C_INCLUDES += C:\Projects\MyApp\myapp\src\armDebug\jni

include $(BUILD_SHARED_LIBRARY)

我使用


  • 插件的gradle 0.9

  • NDK r9d对Windows x64

我倒是AP preciate任何帮助。我得的gradle与一定的经验和GNU编译工具,但我是新来的Andr​​oid和NDK。

I'd appreciate any help. I've got some experience with gradle and GNU build tools but I'm new to Android and the NDK.

推荐答案

像Selvin说,应该尽快添加了另一个源文件被罚款。即使是空的人会做的伎俩。

Like Selvin said, it should be fine as soon as you add another source file. Even an empty one will do the trick.

我充满更多的信息错误报告:<一href=\"https://$c$c.google.com/p/android/issues/detail?id=66937\">https://$c$c.google.com/p/android/issues/detail?id=66937

I've filled a bug report with more information: https://code.google.com/p/android/issues/detail?id=66937

这篇关于[否规则,使目标&QUOT;在Windows编译NDK源当摇篮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆