我正在將我的遺留項目從Eclipse遷移到Android Studio。我做了以下幾件事:如何解決Android Studio錯誤,它找不到項目的清單文件?
- 出口和在eclipse
- 進口的Gradle.build文件Android Studio中的gradle生成生成文件
- 改變了我的gradle這個版本的依賴關係:類路徑「com.android.tools。建設:gradle產出:0.9 +」
我的根目錄下的項目文件夾包含3個庫項目:Actionbarsherlock,Authbahn和庫。我的根文件夾還包含名爲JohelpenHulpverlener的主項目。
Error:A problem was found with the configuration of task ':checkDebugManifest'.
> File 'C:\android\jeugdformaat\JohelpenHulpverlener\AndroidManifest.xml' specified for property 'manifest' does not exist.
我的根的build.gradle看起來是這樣的:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
compile project(":actionbarsherlock")
}
android {
compileSdkVersion 17
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
我的build.gradle在
解決了很多錯誤,我得到以下錯誤後主要項目如下:
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':library')
compile project(':actionbarsherlock')
compile project(':autobahn')
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
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')
}
}
我想了解這一點,希望有人可以幫助我在這裏!
你已經在你的根級gradle文件中添加了一堆東西,而且我不確定它是否屬於它 - 在你說的主要項目中你也有很多東西。你可以通過更多關於你的項目結構的細節來修改你的問題嗎? –
將添加我的項目結構的屏幕截圖! – Fergers