Home » Android » Android Developer Console – wrong fingerprint after release build with Android Studio

Android Developer Console – wrong fingerprint after release build with Android Studio

Posted by: admin May 14, 2020 Leave a comment

Questions:

I started building an Android app with Adobe Air so I needed a .p12 key for building the release version .apk
Next I ported the app to Unity3d so I converted the .p12 to .keystore. Up to this point there was no problem uploading new versions to the Developer Console.

Now I rewrote and redesigned the app with Android Studio. When I upload the release version build with Android Studio I’m not able to publish it because of different fingerprints.
I tried to sign the release build in Android Studio with v1, v2 and both.

Any idea on how to solve the issue?

How to&Answers:

On Unity apk fingerprints creating like “com.companyname.apkname” but On Android Studio fingerprints as default creating like “com.company.name.apkname” and these are diffrent fingerprints as you can see 🙂

It probably solve your problem, try this out and inform me please 🙂

Answer:

After months of troubleshooting I found the solution.

  1. In Android Studio choose “Generate Signed Apk”
  2. Choose “Using v1 (Jar Signature)”
  3. Build the app
  4. Rename your appname.apk to appname.zip
  5. Open the zip file and delete the META-INF Folder
  6. Rename the appname.zip back to appname.apk
  7. open cmd and use the following command:

    jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore C:\PATH_TO_YOUR_KEYSTORE_FILE\yourkeyname.keystore appname.apk 1

  8. After that run one last command:

    C:\PATH_TO_YOUR_ANDROID_BUNDLE_INSTALLATION\Android\adt-bundle-windows-x86_64-20140702\sdk\build-tools\YOUR_CURRENT_BUILD_TOOLS_VERSION\zipalign -p 4 appname.apk newcompletelycorrectsignedapp.apk

Hopefully that was helpful!