相关疑难解决方法(0)

调试不使用Android Studio的C++ /本机库模块(使用Cmake)

我在调试库模块的C++文件时遇到问题.

一般来说这可能吗?

如果应用程序项目包含c ++代码,则调试工作正常.但我想将C++代码移动到库模块.

启动会话时出现错误消息:

现在启动本机调试会话

注意!找不到符号目录 - 请检查您的本机调试配置

我的lib的gradle文件:

apply plugin: 'com.android.library'


android {
compileSdkVersion 24
buildToolsVersion "25.0.2"
defaultConfig {

    minSdkVersion 16
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
    externalNativeBuild {
        cmake {
            arguments "-DANDROID_PLATFORM_LEVEL=${11}",
                    '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static'
        }
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
externalNativeBuild {
    cmake {
        path "CMakeLists.txt"
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-annotations:24.2.0'
}
Run Code Online (Sandbox Code Playgroud)

在运行配置中,调试器设置为auto

在此输入图像描述


加法:

我正在使用:

Gradle:2.2.3

Android Studio:2.2.3


在LLLB控制台中,我检查了断点列表:

断点列表-v

我的所有检查站都列在那里.

不工作的断点 …

debugging android cmake android-ndk android-studio

9
推荐指数
2
解决办法
8719
查看次数

Native Debug Android Studio

当我通过Genymotion运行Native调试时出现了这样的错误.

Starting LLDB server: run-as org.cocos2dx.cpp_empty_test 
  /data/data/org.cocos2dx.cpp_empty_test/lldb/bin/start_lldb_server.sh 
  /data/data/org.cocos2dx.cpp_empty_test/lldb 
  /data/data/org.cocos2dx.cpp_empty_test/lldb/tmp/platform.port1442313534865 
  "lldb process:gdb-remote packets"
Now Launching Native Debug Session
Attention! No symbol directories found - please check your native debug configuration
Failed to attach native debugger: Invalid URL: adb://[169.254.67.102:5555]:46216
Invalid URL: adb://[169.254.67.102:5555]:46216
Process finished with exit code 0

android native adb android-ndk

7
推荐指数
2
解决办法
7143
查看次数

标签 统计

android ×2

android-ndk ×2

adb ×1

android-studio ×1

cmake ×1

debugging ×1

native ×1