gpt4 book ai didi

android - "Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk"

转载 作者:可可西里 更新时间:2023-11-01 13:10:13 25 4
gpt4 key购买 nike

我搜索了整个网络(我认为)。和它说的我试过但仍然没有运气不工作。我在 cygwin 和 windows 下测试它
这是我的项目文件/目录:

D:\Java_2\workspace_indigo\JniTest\.classpath
D:\Java_2\workspace_indigo\JniTest\.project
D:\Java_2\workspace_indigo\JniTest\AndroidManifest.xml
D:\Java_2\workspace_indigo\JniTest\assets
D:\Java_2\workspace_indigo\JniTest\bin
D:\Java_2\workspace_indigo\JniTest\files
D:\Java_2\workspace_indigo\JniTest\gen
D:\Java_2\workspace_indigo\JniTest\native
D:\Java_2\workspace_indigo\JniTest\proguard.cfg
D:\Java_2\workspace_indigo\JniTest\project.properties
D:\Java_2\workspace_indigo\JniTest\res
D:\Java_2\workspace_indigo\JniTest\src
D:\Java_2\workspace_indigo\JniTest\bin\classes
D:\Java_2\workspace_indigo\JniTest\bin\res
D:\Java_2\workspace_indigo\JniTest\bin\classes\com
D:\Java_2\workspace_indigo\JniTest\bin\classes\jni
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni\JniTestActivity.class
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni\R$attr.class
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni\R$drawable.class
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni\R$layout.class
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni\R$string.class
D:\Java_2\workspace_indigo\JniTest\bin\classes\com\testjni\R.class
D:\Java_2\workspace_indigo\JniTest\bin\classes\jni\Natives.class
D:\Java_2\workspace_indigo\JniTest\gen\com
D:\Java_2\workspace_indigo\JniTest\gen\com\testjni
D:\Java_2\workspace_indigo\JniTest\gen\com\testjni\R.java
D:\Java_2\workspace_indigo\JniTest\native\Android.mk
D:\Java_2\workspace_indigo\JniTest\native\Application.mk
D:\Java_2\workspace_indigo\JniTest\native\include
D:\Java_2\workspace_indigo\JniTest\native\lib.c
D:\Java_2\workspace_indigo\JniTest\native\main.c
D:\Java_2\workspace_indigo\JniTest\native\Makefile
D:\Java_2\workspace_indigo\JniTest\native\testlib
D:\Java_2\workspace_indigo\JniTest\native\testlib.c
D:\Java_2\workspace_indigo\JniTest\native\include\jni_Natives.h
D:\Java_2\workspace_indigo\JniTest\native\include\jni_Natives.h_orig
D:\Java_2\workspace_indigo\JniTest\res\drawable-hdpi
D:\Java_2\workspace_indigo\JniTest\res\drawable-ldpi
D:\Java_2\workspace_indigo\JniTest\res\drawable-mdpi
D:\Java_2\workspace_indigo\JniTest\res\layout
D:\Java_2\workspace_indigo\JniTest\res\values
D:\Java_2\workspace_indigo\JniTest\res\drawable-hdpi\ic_launcher.png
D:\Java_2\workspace_indigo\JniTest\res\drawable-ldpi\ic_launcher.png
D:\Java_2\workspace_indigo\JniTest\res\drawable-mdpi\ic_launcher.png
D:\Java_2\workspace_indigo\JniTest\res\layout\main.xml
D:\Java_2\workspace_indigo\JniTest\res\values\strings.xml
D:\Java_2\workspace_indigo\JniTest\src\com
D:\Java_2\workspace_indigo\JniTest\src\jni
D:\Java_2\workspace_indigo\JniTest\src\com\testjni
D:\Java_2\workspace_indigo\JniTest\src\com\testjni\JniTestActivity.java
D:\Java_2\workspace_indigo\JniTest\src\jni\Natives.java

这是我的 ndk NDK_LOG=1 输出:

D:\Java_2\workspace_indigo\JniTest>ndk-build NDK_LOG=1
Android NDK: NDK installation path auto-detected: 'D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Host operating system detected: windows
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host tools prebuilt directory: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/prebuilt/windows/bin
Android NDK: Host 'echo' tool: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/prebuilt/windows/bin/echo.exe
Android NDK: Host 'awk' tool: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/prebuilt/windows/bin/awk.exe
Android NDK: Host 'awk' test returned: Pass
Android NDK: This NDK supports the following target architectures and ABIS:
Android NDK: arm: armeabi armeabi-v7a
Android NDK: mips: mips
Android NDK: x86: x86
Android NDK: This NDK supports the following toolchains and target ABIs:
Android NDK: arm-linux-androideabi-4.4.3: armeabi armeabi-v7a
Android NDK: mipsel-linux-android-4.4.3: mips
Android NDK: x86-4.4.3: x86
Android NDK: Found platform root directory: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms
Android NDK: Found supported platforms: android-14 android-3 android-4 android-5 android-8 android-9
Android NDK: PLATFORM android-14 supports: arm mips x86
Android NDK: ABI arm sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-14/arch-arm
Android NDK: ABI mips sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-14/arch-mips
Android NDK: ABI x86 sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-14/arch-x86
Android NDK: PLATFORM android-3 supports: arm mips x86
Android NDK: ABI arm sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-3/arch-arm
Android NDK: ABI mips sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-3/arch-mips
Android NDK: ABI x86 sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-3/arch-x86
Android NDK: PLATFORM android-4 supports: arm mips x86
Android NDK: ABI arm sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-4/arch-arm
Android NDK: ABI mips sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-4/arch-mips
Android NDK: ABI x86 sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-4/arch-x86
Android NDK: PLATFORM android-5 supports: arm mips x86
Android NDK: ABI arm sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-5/arch-arm
Android NDK: ABI mips sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-5/arch-mips
Android NDK: ABI x86 sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm mips x86
Android NDK: ABI arm sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-8/arch-arm
Android NDK: ABI mips sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-8/arch-mips
Android NDK: ABI x86 sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-8/arch-x86
Android NDK: PLATFORM android-9 supports: arm mips x86
Android NDK: ABI arm sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-9/arch-arm
Android NDK: ABI mips sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-9/arch-mips
Android NDK: ABI x86 sysroot is: D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK: Found project path: .
Android NDK: Ouput path: ./obj
Android NDK: Parsing D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/build/core/default-application.mk
Android NDK: Found APP_PLATFORM=android-8 in ./project.properties
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
D:/cpp/Android/android-ndk-r8-windows/android-ndk-r8/build/core/add-application.mk:133: *** Android NDK: Aborting... . Stop.

和我的 Android.mk

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := Hello
LOCAL_CFLAGS := -Werror
LOCAL_SRC_FILES := lib.c


include $(BUILD_SHARED_LIBRARY)

and my Application.mk
APP_PROJECT_PATH := D:/Java_2/workspace_indigo/JniTest

就像文档中所说的那样简单,但仍然不起作用..为什么我缺少的东西不起作用?

最佳答案

显然,您的 Android.mk 文件位于错误的位置,因为它的当前位置是:

native/Android.mk

并且您的构建脚本希望它位于

src/jni/Android.mk

您必须更改脚本或复制/移动文件。

关于android - "Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10632234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com