我試圖建立我的AndroidStudio版本0.4.4 Android項目,但出現了一些問題後,我感動了文件的build.gradle,現在看起來是這樣的:的Android工作室搖籃無效文件的Manifest.xml
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
signingConfigs {
release {
storeFile file('somekey.jks')
storePassword "pass"
keyAlias "alias"
keyPassword "pass"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
runProguard false
debuggable false
jniDebugBuild false
zipAlign true
renderscriptDebugBuild false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
debuggable true
jniDebugBuild true
renderscriptDebugBuild true
}
}
}
dependencies {
compile 'com.android.support:gridlayout-v7:19.0.1'
compile 'com.android.support:support-v4:19.0.1'
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:4.2.42'
}
這就像在此之前:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:gridlayout-v7:19.0.1'
compile 'com.android.support:support-v4:19.0.1'
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:4.2.42'
}
現在每次我嘗試運行我的項目時收到此錯誤:
Throwable: Invalid file: file://C:/Users/user/AndroidStudioProjects/myprojectname/myproject/build/manifests/debug/AndroidManifest.xml
有誰知道如何解決這個問題?
從'Build> Clean Project'清理一次你的項目,並確保在出現reBuild後出錯的路徑中存在AndroidManifest。 – pyus13
我在發佈之前試過,並沒有奏效。但是今天當打開AndroidStudio時,問題就沒有了...... – Daivid