Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixing debug.keystore to work with ADT 22 and Google Maps v1 API Key

After updating my Android SDK to revision 22.0.1 and updating the Eclipse ADT, I found that I could no longer install a debug build on a device. The console shows this error:

Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES

I found that I could work around this by deleting my debug.keystore file and letting the SDK/ADT recreate it. This let me build and install a debug package.

However, the app uses the Google Maps v1 API, which requires an API key that is tied to the signature of debug.keystore. Re-creation of debug.keystore invalidated that API key, and Google is no longer providing new v1 API keys. So when I run my debug build, the map view is blank.

This is not a showstopper, as a release build still works fine. But is there any way that I can "fix" my original debug.keystore such that it works with ADT 22 and matches my Maps v1 API key?

FWIW, here is the output of keytool -list -v -keystore debug.keystore -storepass android:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: androiddebugkey
Creation date: Feb 20, 2012
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 4f427735
Valid from: Mon Feb 20 11:39:17 EST 2012 until: Sun Nov 16 11:39:17 EST 2014
Certificate fingerprints:
     MD5:  C8:A5:4E:32:68:8A:50:90:C5:F5:A1:5B:3E:9A:CA:86
     SHA1: 0C:C4:5B:66:7F:54:C8:4D:2C:2D:D7:2E:9F:66:29:94:63:0A:19:7D
     Signature algorithm name: SHA1withDSA
     Version: 3


*******************************************
*******************************************
like image 733
Kristopher Johnson Avatar asked May 30 '13 15:05

Kristopher Johnson


People also ask

Why is my API key not working?

API keys have multiple dependencies that can result in errors like: "The user is not authorized for this operation based on …". Please make sure you are using the correct credentials and endpoint with the correct API key.

How do you check if Google Maps API key is valid?

To confirm the key is associated with the project: Go to the Credentials section, which can be accessed from the left side bar under Google Maps Platform > Credentials. Check that the API key you currently use on your website is listed.

Why is Google Maps API not working?

There are a several reasons why your google maps may not be working, the most common issue being no Google Map API key set or set incorrectly. To use the Google Maps JavaScript API, you must register your app project on the Google Cloud Platform Console and get a Google API key which you can add to your app.


1 Answers

Sorry to say but google map api 1 is no longer in use, you have need to use google map api v2 and only after this issue will get resolve.

like image 128
Lucky Rana Avatar answered Sep 28 '22 07:09

Lucky Rana