【问题标题】:Error with ndk-gdb of android-ndk-r9d-linux-x86 in ubuntu 12.04ubuntu 12.04 中 android-ndk-r9d-linux-x86 的 ndk-gdb 出错
【发布时间】:2014-05-16 06:09:43
【问题描述】:

我在 ubuntu 12.04 中使用 android-ndk-r9d-linux-x86 的 ndk-gdb 来调试 android 原生应用程序“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 没问题,我想知道为什么?谢谢。

【问题讨论】:

    标签: c++ linux ubuntu android-ndk ndk-gdb


    【解决方案1】:

    我相信 'ndk-gdb' 已被弃用,取而代之的是 'ndk-gdb.py'(虽然这还没有被广泛宣传,IMO。)使用 r9d,我遇到了与您在上面报告的相同的问题,但是 python版本运行没有问题。

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-03-28
        • 2011-06-25
        • 1970-01-01
        • 2019-08-07
        • 1970-01-01
        • 2013-11-05
        • 1970-01-01
        • 2018-05-05
        相关资源
        最近更新 更多