Hello Everyone,

I am here with my hat in hand begging for a clue. So have tried to
follow the directions for release keys and jar signing to the letter,
and I am still in fail mode. Here are my references:

http://code.google.com/android/toolbox/apis/mapkey.html

http://code.google.com/android/devel/sign-publish.html

http://code.google.com/android/maps-api-signup.html


Here is the cookbook:

1. ant release.

Buildfile: C:\home\cgraham\projects\noi-momentarynow-android\build.xml
dirs:
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\home\cgraham\projects\noi-momentarynow-
android\bin\classes
resource-src:
     [echo] Generating R.java / Manifest.java from the resources...
aidl:
     [echo] Compiling aidl files into Java classes...
compile:
    [javac] Compiling 143 source files to C:\home\cgraham\projects\noi-
momentarynow-android\bin\classes
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
dex:
     [echo] Converting compiled files and external libraries into bin/
classes.dex...
package-res:
package-res-no-assets:
     [echo] Packaging resources...
release:
     [echo] Packaging bin/noi-momentarynow-android-unsigned.apk for
release...
     [echo] It will need to be signed with jarsigner before being
published.
BUILD SUCCESSFUL
Total time: 7 seconds

2. sign the unsigned jar.

2a. create the key

c:\home\cgraham\projects\noi-momentarynow-android\bin>keytool -genkey -
v -keystore momentarynow-android-release-key.keystore -alias
mn_android -keyalg RSA -validity 10000

2b. update the key for the release key supplied by google

c:\home\cgraham\projects\noi-momentarynow-android\bin>keytool -list -
keystore momentarynow-android-release-key.keystore
Enter keystore password:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        xmlns:android="http://schemas.android.com/apk/res/android";
        android:id="@+id/map_layout">
        <RelativeLayout android:id="@+id/map_display_layout"
                android:layout_width="wrap_content" android:layout_height="92px"
                android:visibility="gone">
        </RelativeLayout>
        <RelativeLayout android:id="@+id/map_layout"
                android:layout_below="@+id/map_display_layout"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent">
                <!-- release -->
                <com.google.android.maps.MapView
                        android:layout_below="@id/map_display_layout"
                        android:id="@+id/maplocator_activity" 
android:enabled="true"
                        android:clickable="true"
                        
android:apiKey="SUPPLIEDBYGOOGLE-basedonMD5-from-momentarynow-
android-release-key.keystore"
                        android:layout_height="fill_parent"
android:layout_width="fill_parent"/>

        </RelativeLayout>
</RelativeLayout>

c:\home\cgraham\projects\noi-momentarynow-android\bin>copy noi-
momentarynow-android-unsigned.apk noi-momentarynow-android.apk

2c. run jarsigner

c:\home\cgraham\projects\noi-momentarynow-android\bin>jarsigner -
verbose -keystore momentarynow-android-release-key.keystore noi-
momentarynow-android.apk mn_android

3. verify the signing
c:\home\cgraham\projects\noi-momentarynow-android\bin>jarsigner -
verify -verbose
 noi-momentarynow-android.apk

all entries are listed as sm

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.

4. install the apk file.

C:\clay\installs\android-sdk-windows-1.0_r1\tools>adb install c:\home
\cgraham\projects\noi-momentarynow-android\bin\noi-momentarynow-
android.apk
1204 KB/s (0 bytes in 558864.000s)
        pkg: /data/local/tmp/noi-momentarynow-android.apk
Success

RESULT:

The application installs but when I go to the map activity the tiny
checkerboard grid is shown instead of beautiful google maps, which
would indicate that there is an api key failure.

Any and all help is appreciated, I tried to be spot on and thorough
but alas...fail.

Clay


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to