我在将源代码从github移动到Android Studio时遇到了很多麻烦,我认为问题的一大部分是使用gradle构建工具文件。我以前从未使用过android studio,也没有一般的编码经验。我现在得到的gradle同步错误是
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':library')
}
android {
compileSdkVersion 19
buildToolsVersion "25.0.1"
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')
}
buildTypes {
debug{
debuggable = true
}
}
我觉得问题的一部分可能是我添加actionbarsherlock库的方式。我不得不添加很多文件夹,因此我的路径可能会导致问题。这有可能吗?如果可能更有帮助,我可以添加截图。
{{1}}
}