我在eclipse-NDK中有以前的代码,它在eclipse中成功运行我需要将这个项目导入android studio并运行,但它现在显示运行时错误(不幸的是强制关闭)错误为什么会发生它如果它是干净的代码急需帮助 . 我的构建文件是:buildscript {repositories {mavenCentral()} dependencies {classpath'com.android.tools.build:grad:0.12 . '}}应用插件:'android'
dependencies {compile fileTree(dir:'libs',include:'* .jar')}
android {compileSdkVersion 19 buildToolsVersion“20.0.0”
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
ndk{
moduleName "filters"
abiFilter "armeabi-v7a"
stl "gnustl_static"
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/libs'
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}