I'm trying to migrate my app and adding classpath 'com.google.gms:google-services:1.3.0-beta1' breaks the build:
This is my top level gradle.build:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.github.hamsterksu:android-appversion-gradle-plugin:1.2.+'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
}
Doing that fails the build with the following message:
What went wrong: A problem was found with the configuration of task ':app:zipalignAppDebug'.
File '/path../outputs/apk/app-app-debug-unaligned.apk' specified for property 'inputFile' does not exist.
i have found these problem too, and i found its because i have using 22 buildtoolsversion
change your buildToolsVersion to version 23, and it will work again
open app/build.gradle
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc3"
defaultConfig {
applicationId "packagename.id"
minSdkVersion 15
targetSdkVersion 22
versionCode appVersionCode
versionName appVersionName
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.