Oh my gosh, | got it to work.

I shuffled around my maps.jar and by copied it next to android,jar and
mucked around with the build path. Et voila!

Thanks to Konrad and Xav for pointing me on the correct path. Much
appreciated!!!






Konrad Pietzka wrote:
> Hi Ian,
>
> Do you have the following entires in your AndriodManifest.xml?
>
> <uses-library android:name="com.google.android.maps" />
> Which should be within <application>
>
> And
>
> <uses-permission android:name="android.permission.INTERNET" />
> Within <manifest>
>
> Otherwise it wont work
>
> Cheers
>
> -----Ursprüngliche Nachricht-----
> Von: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] Im Auftrag von ian
> Gesendet: Dienstag, 6. Oktober 2009 17:22
> An: Android Developers
> Betreff: [android-developers] Re: mapview key problems
>
>
> Well I think you are correct about that superclass problem. But I'm
> unsure how to fix it. Any suggestions?
>
>
> On Oct 6, 10:56 am, "Konrad Pietzka" <kon...@java-schmiede.de> wrote:
> > Hi
> >
> > Your problem might be caused of being unable to resolve superclass, look
> at
> > following logcat entries:
> >
> > 10-06 13:34:50.316: WARN/dalvikvm(723): Unable to resolve superclass
> > of Lian/com/elgin/Elgin; (134)
> > 10-06 13:34:50.336: WARN/dalvikvm(723): Link of class 'Lian/com/elgin/
> > Elgin;' failed
> > 10-06 13:34:50.357: DEBUG/AndroidRuntime(723): Shutting down VM
> >
> > Hope this helps
> >
> > -----Ursprüngliche Nachricht-----
> > Von: android-developers@googlegroups.com
> > [mailto:android-develop...@googlegroups.com] Im Auftrag von ian
> > Gesendet: Dienstag, 6. Oktober 2009 15:42
> > An: Android Developers
> > Betreff: [android-developers] Re: mapview key problems
> >
> > Here is the tail end of my logcat for a run where it crashed. I notice
> > it added a capital letter L before the ian.com.elgin about 10 lines
> > down.
> >
> > 10-06 13:34:48.146: INFO/ActivityManager(571): Start proc
> > ian.com.elgin for activity ian.com.elgin/.Elgin: pid=723 uid=10023
> > gids={3003}
> > 10-06 13:34:48.197: INFO/jdwp(642): received file descriptor 31 from
> > ADB
> > 10-06 13:34:48.307: INFO/jdwp(658): received file descriptor 25 from
> > ADB
> > 10-06 13:34:48.457: INFO/jdwp(676): received file descriptor 27 from
> > ADB
> > 10-06 13:34:48.567: INFO/jdwp(680): received file descriptor 34 from
> > ADB
> > 10-06 13:34:48.856: INFO/jdwp(723): received file descriptor 20 from
> > ADB
> > 10-06 13:34:50.296: WARN/dalvikvm(723): Class resolved by unexpected
> > DEX: Lian/com/elgin/Elgin;(0x43594518):0x192640 ref [Lcom/google/
> > android/maps/MapActivity;] Lcom/google/android/maps/MapActivity;
> > (0x43594518):0x1886e8
> > 10-06 13:34:50.316: WARN/dalvikvm(723): Unable to resolve superclass
> > of Lian/com/elgin/Elgin; (134)
> > 10-06 13:34:50.336: WARN/dalvikvm(723): Link of class 'Lian/com/elgin/
> > Elgin;' failed
> > 10-06 13:34:50.357: DEBUG/AndroidRuntime(723): Shutting down VM
> > 10-06 13:34:50.375: WARN/dalvikvm(723): threadid=3: thread exiting
> > with uncaught exception (group=0x4000fe70)
> > 10-06 13:34:50.396: ERROR/AndroidRuntime(723): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):
> > java.lang.IllegalAccessError: cross-loader access from pre-verified
> > class
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > dalvik.system.DexFile.defineClass(Native Method)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > dalvik.system.DexFile.loadClass(DexFile.java:193)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:573)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:532)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.app.Instrumentation.newActivity(Instrumentation.java:1097)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 2186)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> > 2284)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.app.ActivityThread.access$1800(ActivityThread.java:112)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.os.Looper.loop(Looper.java:123)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > android.app.ActivityThread.main(ActivityThread.java:3948)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > java.lang.reflect.Method.invoke(Method.java:521)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> > (ZygoteInit.java:782)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):     at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> > 10-06 13:34:50.467: ERROR/AndroidRuntime(723):
> >      at dalvik.system.NativeStart.main(Native Method)
> > 10-06 13:34:50.557: INFO/Process(571): Sending signal. PID: 723 SIG: 3
> > 10-06 13:34:50.557: INFO/dalvikvm(723): threadid=7: reacting to signal
> > 3
> > 10-06 13:34:50.916: INFO/dalvikvm(723): Wrote stack trace to '/data/
> > anr/traces.txt'
> > 10-06 13:34:57.203: WARN/ActivityManager(571): Launch timeout has
> > expired, giving up wake lock!
> > 10-06 13:34:59.507: WARN/ActivityManager(571): Activity idle timeout
> > for HistoryRecord{436ad390 {ian.com.elgin/ian.com.elgin.Elgin}}
> > 10-06 13:35:05.987: DEBUG/dalvikvm(680): GC freed 2923 objects /
> > 164832 bytes in 487ms
> > 10-06 13:35:11.126: DEBUG/dalvikvm(614): GC freed 1356 objects / 70072
> > bytes in 606ms
> >
> > On Oct 6, 9:16 am, ian <stilbit...@gmail.com> wrote:
> >
> > > That is interesting although I do not understand logcat yet.
> >
> > > I tried copying the debug.keystore from the working machine and using
> > > the api key from that machine instead. No difference. I regenerated
> > > the md5 fingerrprint with keytool on my netbook and Google returned
> > > the same api key as for the upstairs machine.
> >
> > > So it looks like the crash is not due to a bad api key. The netbook
> > > will run fairly complex non-mapview programs just fine, and only has
> > > trouble when mapview is added to an .xml layout file.
> >
> > > I must somehow have improperly set up the environment. Or there is
> > > something peculiar about the HP netbooks with the Atom270 chip.
> >
> > > By the way, Google Maps works great freestanding on the emulator when
> > > it is not being called by my program.
> >
> > > I'll try to fing the logcat output and look for clues....
> >
> > > Cheers
> >
> > > On Oct 6, 5:30 am, Xavier Ducrohet <x...@android.com> wrote:
> >
> > > > I didn't realize your app crashed. I expected that the app only didn't
> > > > display the map tiles (which would be a sign of a apiKey problem).
> >
> > > > When your app crashes, you should always look at logcat. It'll give
> > > > you the exact reason why your app crashed.
> >
> > > > Xav
> >
> > > > On Mon, Oct 5, 2009 at 8:44 PM, ian <stilbit...@gmail.com> wrote:
> >
> > > > > That is a very good suggestion about copying the debug.keystore from
> > > > > the working machine and \i will try it in the morning when I have
> > > > > access to it again
> >
> > > > > I didn't quite understand the second part;
> >
> > > > >> - How about your release certificate? does the app signed with it
> > (and
> > > > >> using the release api key) work?
> >
> > > > > but I will think it over. I think the answer to the question is no,
> > > > > Nothing so far has worked on the netbook when mapview was involved.
> > > > > All crash with a force close. However on the machine upstairs,
> > > > > everything seems to work like with my previous computer.
> >
> > > > > On Oct 6, 12:05 am, Xavier Ducrohet <x...@android.com> wrote:
> > > > >> - You could do is copy the debug keystore
> > > > >> (HOME/.android/debug.keystore) from the machine that works, and
> copy
> > > > >> it in the machine that doesn't work, and then you can use the API
> > keys
> > > > >> associated with that working keystore.
> > > > >> - How about your release certificate? does the app signed with it
> > (and
> > > > >> using the release api key) work?
> >
> > > > >> On Mon, Oct 5, 2009 at 7:47 PM, ian <stilbit...@gmail.com> wrote:
> >
> > > > >> > Now I had a trojan which I fixed with hijackthis, stinger and
> AVG,
> > but
> > > > >> > even after a cleanup, my mapview problems continue.
> >
> > > > >> > I was able to easily install and run hello MapView on another
> > computer
> > > > >> > upstairs in 15 minutes. The two computers share the same internet
> > > > >> > line, I used my same Google login identity, both had the same
> > trojan
> > > > >> > fix and the mapview installations were identical, I believe,
> except
> > > > >> > for different api keys for each machine. Yikes!
> >
> > > > >> > My code which will not run on my new netbook is very simple and
> as
> > > > >> > follows:
> >
> > > > >> > package ian.com.return2;
> >
> > > > >> > import com.google.android.maps.MapActivity;
> >
> > > > >> > import android.app.Activity;
> > > > >> > import android.os.Bundle;
> >
> > > > >> > public class return2 extends MapActivity {
> > > > >> >    /** Called when the activity is first created. */
> > > > >> >   �...@override
> > > > >> >    public void onCreate(Bundle savedInstanceState) {
> > > > >> >        super.onCreate(savedInstanceState);
> > > > >> >        setContentView(R.layout.main);
> > > > >> >    }
> >
> > > > >> >   �...@override
> > > > >> >    protected boolean isRouteDisplayed() {
> > > > >> >        return false;
> > > > >> >    }
> >
> > > > >> > ////////////////////////////////////////////////////
> > > > >> > <?xml version="1.0" encoding="utf-8"?>
> > > > >> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > > > >> > android"
> > > > >> >    android:orientation="vertical"
> > > > >> >    android:layout_width="fill_parent"
> > > > >> >    android:layout_height="fill_parent"
> > > > >> >    >
> > > > >> > <TextView
> > > > >> >    android:layout_width="fill_parent"
> > > > >> >    android:layout_height="wrap_content"
> > > > >> >    android:text="@string/hello"
> > > > >> >    />
> >
> > > > >> >        <com.google.android.maps.MapView
> > > > >> >        android:id="@+id/mapview"
> > > > >> >        android:layout_width="fill_parent"
> > > > >> >        android:layout_height="fill_parent"
> > > > >> >        android:clickable="true"
> > > > >> >   android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
> > > > >> >    />
> >
> > > > >> > </LinearLayout>
> >
> > > > >> > /////////////////////////////////////////
> > > > >> > <?xml version="1.0" encoding="utf-8"?>
> > > > >> > <manifest
> >
> > xmlns:android="http://schemas.android.com/apk/res/android";
> >
> > > > >> >      package="ian.com.return2"
> > > > >> >      android:versionCode="1"
> > > > >> >      android:versionName="1.0">
> > > > >> >    <application android:icon="@drawable/icon"
> >
> > ...
> >
> > read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to