0

I'm using Android Studio and i generated signed APKs multiple times.
Today i have add Google Analytics (according to this guide) to my app, and when i tried to generate a signed APK, suddenly i get the error Keystore was tampered with, or password was incorrect.
Then i deleted all the changes i had to to do for getting the Analytics to work, and i succeed to generate signed APK.

I saw some questionsregarding the Keystore error i get, all use commands (such as keytool -genkey -keystore ...) but i'm generating the APK with Build -> Generate Signed APK

Community
  • 1
  • 1
Presen
  • 1,809
  • 4
  • 31
  • 46

1 Answers1

0

So finally i succeed to manage this issue.
The problem was indeed occurred after adding classpath 'com.google.gms:google-services:1.4.0-beta3' to my project's top-level build.gradle, according to google guide.
The solution was to put the classpath to the app-level build.gradle.
Overall i had made no changes to the project's top-level build.gradle, and know my app-level build.gradle looks like:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'


android {
//...
    buildTypes {
    //...
    }
}

dependencies {
    compile 'com.android.support:support-v4:19.1.0'
    compile files('libs/bolts-android-1.1.3.jar')
    compile 'com.google.android.gms:play-services:8.1.0'
}

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms:google-services:1.4.0-beta3'
    }
}

This issue was also reported

Presen
  • 1,809
  • 4
  • 31
  • 46