NDKのデバッグには非常に新しいので、デバッグ用のcppコードを作成しようとしています。AndroidスタジオでNDK_PROJECT_PATHを設定するには
これは私のApplication.mkファイルがどのように見えるかです:
APP_STL := stlport_static
APP_MODULES := abc xyz
APP_CFLAGS += -fno-rtti -fexceptions
APP_ABI := armeabi armeabi-v7a
NDK_TOOLCHAIN := arm-linux-androideabi-4.9
とI次のエラーを取得し、私は私が何をしないのです、NDKツール内のすべてのツールチェーンを試してみましたか?
更新: 私はAndroidのスタジオから実行されたときに建てNDK_PROJECT_PATHは、nullに設定されていることに気づきました。私は実行することができます
ndk-build -Cターミナルから。
実際に私の究極の目的は、ブレークポイントを設定して、ネイティブのC++ファイルをデバッグできるようにすることです。
だから、現在のシナリオ: 私はXYZフォルダにネイティブコードを持ってandroid.mkとapplication.mk
を含むJNIフォルダを持っている私は、このフォルダ内に、NDK-構築との.soファイルを取得実行することができ、そのI手動で私のAndroidアプリ(たとえばAPPB)のjnilibsフォルダにペーストをコピーします。
これはAPPBのGradleのです:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 13
targetSdkVersion 13
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile 'junit:junit:4.12'
// compile 'com.android.support:appcompat-v7:24.1.1'
}
後、私は別のアプリに依存関係としてこのアプリを使用APPAを言います。
これはAPPAのGradleのである:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "*****"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories{
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:preference-v14:24.1.0'
compile project(':appB')
}
Iデバッグできるようにする必要がある(これは私ができる) APPA ネイティブコードはAPPBでの.soとして含まれる(私ができる) APPB( aap
http://stackoverflow.com/a/29471014/5628333私は今2日以来、私はapplication.mkで複数のAPP_MODULESを持っていますが、私は.soが取得しないことをやろうとしてきた –