你APP_BUILD_SCRIPT指向一个未知文件:./jni/Android.mk [英] Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
问题描述
我试图让NDK-gdb的工作,但我有一些问题。
I am trying to get ndk-gdb to work but I have some problems.
我的项目结构是这样的:
My project structure is something like this:
trunk
--indiana (Here is the android_manifest)
--ubravo_java
----mbravo (here is the native code)
------jni (here are the Android.mk and Application.mk)
问题1:我明白,我可能要运行从那里清单位于正确的目录NDK-GDB?或者我提供--project参数将NDK-gdb的命令。
Question 1: I understand that I probably have to run ndk-gdb from the directory where the manifest is located correct? Or I provide the --project parameter to the ndk-gdb command.
所以,如果我尝试推出的NDK-GDB是这样的:
So if I try to launch the ndk-gdb like this:
ndk-gdb --start --force --verbose --project=/home/johan/projects/indiana2/trunk/indiana
我得到这个输出,对我表示这是试着直接找到Android.mk在该ANDROID_MANIFEST文件位于主项目的子文件夹,但我可能是错的。
I get this output which to me indicates that it is tryin to find the Android.mk directly in the subfolder of the main project where the android_manifest file is located but I might be wrong.
Android NDK installation path: /home/johan/android-ndk-r7
Using default adb command: /home/johan/android-sdk-linux/platform-tools//adb
ADB version found: Android Debug Bridge version 1.0.29
Using final ADB command: '/home/johan/android-sdk-linux/platform-tools//adb'
Using specified project path: /home/johan/projects/indiana2/trunk/indiana
Found package name: net.genaker.indiana
/home/johan/android-ndk-r7/build/core/add-application.mk:133: *** Android NDK: Aborting... . Stop.
ABIs targetted by application: Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
Device API Level: 10
Device CPU ABIs: armeabi-v7a armeabi
ERROR: The device does not support the application's targetted CPU ABIs!
Device supports: armeabi-v7a armeabi
Package supports: Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
在Application.mk我APP_BUILD_SCRIPT路径是这样的:
My APP_BUILD_SCRIPT path in Application.mk looks like this:
APP_BUILD_SCRIPT:= $(APP_PROJECT_PATH)/jni/Android.mk
APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/jni/Android.mk
但在这里,我不知道是什么APP_PROJECT_PATH所指的。我也试图硬code中的完整路径Android.mk文件例如/ home /约翰/项目/ ...等,但错误依然隆重推出:
But here I am not sure what the APP_PROJECT_PATH is referring to. I have also tried to hardcode the full path to the Android.mk file like /home/johan/projects/... etc but the error still comes out with:
您APP_BUILD_SCRIPT指向一个未知文件:./jni/Android.mk
Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
如此看来作为路径不改变像它甚至没有看我的Application.mk。
so it seems as the path is not changed like it is not even looking at my Application.mk.
我试图寻找到APP_PROJECT_PATH引用的全部主干DIR这个参数仅此文件夹中此Application.mk中定义的。我只是认为我能够创建一个项目和调试,而无需使用/ JNI文件夹中直接包含清单文件右侧的文件夹下的子文件夹?
I have tried to search the full trunk dir for references to APP_PROJECT_PATH and this parameter is only defined in this folder in this Application.mk. I just assume that I am able to create a project and debug it without having the /jni folder as a subfolder directly underneath the folder which contains the manifest file right?
pciated如何得到调试工作任何提示AP $ P $。
Any hints appreciated on how to get the debugging working.
推荐答案
我遇到过今天同样的问题,我的解决办法是build-native.sh前EXCUTE以下脚本:
出口NDK_PROJECT_PATH = [项目文件夹] /安卓
(请注意,您必须使用绝对路径)
I have met same problem today, and my solution is to excute below script before build-native.sh: export NDK_PROJECT_PATH=[your project folder]/android (please note you must use absolute path)
和它的作品呢。我想你可以硬code在Application.mk的APP_PROJECT_PATH,它应该是一样的。
and it works then. I guess you could hardcode the APP_PROJECT_PATH in Application.mk, it should be same.
这篇关于你APP_BUILD_SCRIPT指向一个未知文件:./jni/Android.mk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!