Reputation: 697
I'm trying to build my android project on AndroidStudio version 0.4.4, but something went wrong after I touched the file build.gradle, which now looks like this:
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'
}
It was like this before:
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'
}
Now I getting this error every time I try to run my project:
Throwable: Invalid file: file://C:/Users/user/AndroidStudioProjects/myprojectname/myproject/build/manifests/debug/AndroidManifest.xml
Does anyone know how to fix this?
Upvotes: 5
Views: 8503
Reputation: 25858
It's a coincidence that as soon as I commented on your question I also ended up with same error and I resolved it my own.
File > Invalidate Caches/Restart
Solved my problem.
Upvotes: 20
Reputation: 1
I had the same problem. I found out it was caused, when I have an already running application followed by
Build -> Clean Project or Build -> Rebuild Project then trying to Run the project.
The solution was to terminate the running app by:
1) Go to the Android DDMS window, 6:Android.
2) Select the running App.
3) Click the X (Terminate Application).
Upvotes: 0