2012-10-29 95 views
0

我運行了NDK項目,然後輸入命令。它會產生錯誤。我不知道如何解決它。無法調試NDK。奇怪的錯誤

這是命令。

[email protected]:~/Programs/AndroidNDK/samples/hello-gl2$ $NDK_HOME/ndk-gdb 
/home/hieund/Programs/AndroidNDK/build/core/build-local.mk:40: build/core/init.mk: No such file or directory 
/home/hieund/Programs/AndroidNDK/build/core/build-local.mk:166: /add-application.mk: No such file or directory 
/home/hieund/Programs/AndroidNDK/build/core/build-local.mk:174: /setup-imports.mk: No such file or directory 
/home/hieund/Programs/AndroidNDK/build/core/build-local.mk:191: /build-all.mk: No such file or directory 
make: *** No rule to make target `/build-all.mk'. Stop. 
ERROR: The device does not support the application's targetted CPU ABIs! 
     Device supports: armeabi-v7a armeabi 
     Package supports: 

我檢查了make的版本,沒關係。

[email protected]:~/Programs/AndroidNDK/samples/hello-gl2$ make -version 
GNU Make version 3.75, by Richard Stallman and Roland McGrath. 
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96 
    Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. 
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. 

Report bugs to <[email protected]>. 

回答

1

我覺得問題是ndk-gdb無法找到最新的make。這個命令解決了這個問題:

export GNUMAKE=/usr/bin/make 
1

The device does not support the application's targetted CPU ABIs!您正在構建您的設備不支持的庫。檢查設備CPU ABI

String abi=Build.CPU_ABI; 
Toast.makeText(CpuinfoActivity.this, "CPU ABI is :::"+abi, Toast.LENGTH_LONG).show(); 
0

ndk-gdb在Linux上預計某些環境。我運行它如下:

>ANDROID_NDK_ROOT=/etc/android-ndk-r8b GNUMAKE=/etc/android-ndk-r8b/prebuilt/linux-x86/bin/make ndk-gdb 

如果您願意,您可以使用/usr/bin/make