在ubuntu 12.04中,android-ndk-r9d-linux-x86的ndk-gdb出现错误

我在ubuntu 12.04中使用了android-ndk-r9d-linux-x86的ndk-gdb来debuggingandroid原生应用程序“hello-jni”,但是却收到了这个错误。

WARNING: The shell running this script isn't bash. Although we try to avoid bashism in scripts, things can happen. .../adt-bundle-linux-x86-20140321/android-ndk-r9d/ndk-gdb: 143: .../adt-bundle-linux-x86-20140321/android-ndk-r9d/ndk-gdb: Bad substitution .../adt-bundle-linux-x86-20140321/android-ndk-r9d/ndk-gdb: 555: [: 1: unexpected operator .../adt-bundle-linux-x86-20140321/android-ndk-r9d/ndk-gdb: 771: [: armeabi-v7a: unexpected operator 

但android-ndk-r8e-linux-x86是好的,我不知道为什么? 谢谢。

Solutions Collecting From Web of "在ubuntu 12.04中,android-ndk-r9d-linux-x86的ndk-gdb出现错误"

我相信'ndk-gdb'已经被弃用,以支持'ndk-gdb.py'(尽管这还没有被广泛宣传,IMO)。使用r9d,我有上面报告的同样的问题,但Python版本没有工作问题。

WARNING: The shell running this script isn't bash. Although we try to avoid bashism in scripts, things can happen. —这意味着你正在使用类似破折号的东西。

将/ bin / sh更改为/ bin / bash将解决警告和“错误替换”问题。