Question

I have created a release keystore using the Eclipse IDE. I signed it using keytool and registered on Google Maps. I plugged in the key but my map doesn't show up.

Maps show up properly when I use the key associated with my debug keystore.

How can I diagnose this? I followed the same steps as i did with debug, for release.

UPDATE:

Here is my manifest file:

      <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.cancertrials" android:versionCode="1"
    android:versionName="1.0">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
        <activity android:label="@string/app_name" android:name="splash">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".HomeActivity" android:label="@string/app_name" android:windowSoftInputMode="stateHidden">
        </activity>
        <activity android:name=".moreactivity" android:label="@string/app_name">
        </activity>
        <activity android:name=".aboutmedtrust" android:label="@string/app_name">
        </activity>
        <activity android:name=".aboutclinical" android:label="@string/app_name">
        </activity>
        <activity android:name=".aboutglaxosmith" android:label="@string/app_name">
        </activity>
        <activity android:name=".termsofuse" android:label="@string/app_name">
        </activity>
        <activity android:name=".privacy" android:label="@string/app_name">
        </activity>
        <activity android:name=".feedback" android:label="@string/app_name">
        </activity>
        <activity android:name=".informationcancer" android:label="@string/app_name">
        </activity>
        <activity android:name="AdvanceSearchActivity" android:label="@string/app_name">
        </activity>
        <activity android:name="SearchingActivity"></activity>
        <activity android:name="AdvanceSearchTab1"></activity>
        <activity android:name="AdvanceSearchTab2"></activity>
        <activity android:name="DetailedActivity"></activity>
        <activity android:name="summary"></activity>
        <activity android:name="conditions"></activity>
        <activity android:name="description"></activity>
        <activity android:name="inclusion"></activity>
        <activity android:name="exclusion"></activity>
        <activity android:name="BookmarkActivity"></activity>
        <activity android:name="RecentActivity"></activity>
        <activity android:name="information"></activity>
    <uses-library android:name="com.google.android.maps"></uses-library>
    <activity android:name="Mapsactivity">
    </activity>
    <activity android:name="mapView"></activity>

</application>
    <uses-sdk android:minSdkVersion="3" />

</manifest> 
Was it helpful?

Solution

You have to obtain a separate API key when signing with the release key store as your fingerprint changes.

Make sure to also install the .apk signed with the right key.

Update: What I meant is are you sure you sign your APK with the right key? That means are you sure you sign it with the release keystore when generating the APK?

When you are exporting it, are you actually really selecting the keystore with which to sign it?

OTHER TIPS

Did you add the internet permission? This question is asked literally every day.

So I encountered this problem myself yesterday and I resolved by manually signing the .apk

I assume you are using your private keystore and you have entered the release map key in your mapview (and other resources, as needed).

In order to do, you choose your projekt from Eclipse's project explorer (right click) -> Android Tools -> Export unsigned package. Save it where ever you like.

Open your terminal (I'm on a Windows 7 machine), cd into your jdk folder (NOT jre), cd further into bin\ .

Use following command: (Note that the " are required if you type a path)

        jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore "path-to-your-keystore" "path-to-your-apk" <apk alias> -certs 

To verify the signing process do

jarsigner -verify "path-to-recently-signed-apk" -verbose 

(You can leave the verbose option out if you want). It will (hopefully) show jar verified (eventually it will warn you about entries without a validated certificate chain, that didnt matter in my case)

Then run zipalign:

zipalign -v 4 "path-to-signed-apk" "path-to-signed-and-aligned.apk"

Note that it will create a new apk, which is aligned to googles standards.

Install that apk and your maps should show up fine!

From: http://developer.android.com/tools/publishing/app-signing.html#ExportWizard

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top