【发布时间】:2015-08-25 16:09:13
【问题描述】:
我已经从 eclipse 和
中导出了我的一个旧项目将其导入android studio。我收到错误:带有 id 的插件 找不到“Android”
我发现了一些对这个错误的引用,但这些建议对我不起作用,下面是我的 build.gradle 文件:
apply plugin: 'android'
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':Panic Phase 2:PanicPhase2:PanicAndroid:facebook-android-sdk-master:facebook')
compile project(':google_play_services:libproject:google-play-services_lib')
}
android {
compileSdkVersion 11
buildToolsVersion "23.0.0 rc3"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// 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')
}
}
【问题讨论】:
标签: java android android-studio gradle build.gradle