maps api and 1.5

by wayne mcfadden- Red Droid » Sat, 18 Apr 2009 22:15:10 GMT


Sponsored Links
 orry guys, originally i posted to discussion which is the wrong
place.....



I'm migrating over an application from 1.1 to 1.5 and it uses the
Google maps. I got through most of the class path issues resolved I
think but when launching the application I get the following message.

04-18 13:19:11.598: WARN/dalvikvm(816): Class resolved by unexpected
DEX: Lnet/company/android/OrgMapActivity;(0x43732af0):0x192310 ref
[Lcom/google/android/maps/MapActivity;] Lcom/google/android/maps/
MapActivity;(0x43732af0):0x188228
04-18 13:19:11.598: WARN/dalvikvm(816): Unable to resolve superclass
of Lnet/company/android/OrgMapActivity; (106)
04-18 13:19:11.608: WARN/dalvikvm(816): Link of class 'Lnet/company/
android/OrgMapActivity;' failed

So it looks like the error is Unable to resolve superclass which I
think is caused by not having
<uses-library android:name="com.google.android.maps" />
in the androidmanifest.

In my case, this line is in there. Is there a new uses-library for
1.5? Docs say that it's ok. Or specific classpath settings since the
maps.jar has been moved out? I'm not getting compilation errors, just
runtime.

I tried moving the maps.jar into the assets directory and that did not
work either.

Some other trace is below.
Thanks in advance!
Wayne McFadden

04-18 13:43:59.710: WARN/dalvikvm(776): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
04-18 13:43:59.710: ERROR/AndroidRuntime(776): Uncaught handler:
thread main exiting due to uncaught exception
04-18 13:43:59.979: ERROR/AndroidRuntime(776):
java.lang.ExceptionInInitializerError
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
java.lang.Class.newInstanceImpl(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
java.lang.Class.newInstance(Class.java:1472)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.app.Instrumentation.newActivity(Instrumentation.java:1097)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2186)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.os.Looper.loop(Looper.java:123)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
java.lang.reflect.Method.invokeNative(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
java.lang.reflect.Method.invoke(Method.java:521)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): at
dalvik.system.NativeStart.main(Native Method)
04-18 13:43:59.979: ERROR/AndroidRuntime(776): Caused by:
java.lang.NoClassDefFoundError: net.company.android.OrgMapActivity
04-18



maps api and 1.5

by Brian Conrad » Sun, 19 Apr 2009 02:53:21 GMT


 id you set the project up for level see or Google Apps which include 
the Maps library and 1.5? Just 1.5 won't do for MapActivity as I found
out when I recompiled my program but setting it to Google Apps (the
third setting) fixed it.

wayne mcfadden- Red Droid wrote:


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


maps api and 1.5

by Xavier Ducrohet » Sun, 19 Apr 2009 03:23:59 GMT


 s long as you set the build target to be "Google APis" and set the
uses-library you should be good.

Is the class net.company.android.OrgMapActivity in a different project
referenced by your app project?

Xav

On Sat, Apr 18, 2009 at 7:15 AM, wayne mcfadden- Red Droid
<waynemcfad...@gmail.com> wrote:



--
Xavier Ducrohet
Android Engineer, Google.

--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by wayne mcfadden- Red Droid » Sun, 19 Apr 2009 23:22:42 GMT


 Hi Guys,
The problem I think was that while trying to get this running and
trying different configs, I imported the maps.jar via the class path.
All you need to do is set the build target to be the Google APIs like
the responses above say.   Once I removed the jar from the class path,
the app came up fine.

Thanks again for the responses. I really appreciate it!
Wayne

--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by Andr茅 Charles Legendre » Tue, 21 Apr 2009 19:37:35 GMT


 Hi

I get the same problem, and changed the build target to be the Google
API, then I create an AVD for Google Api
and finaly I get :

Unable to resolve superclass of Lorg/example/android/apis/MapViewDemo;

where org.example.android.apis is the package and MapViewDemo is a
copy of MapViewDemo.java provided in samples.

My manifest is :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
      package="org.example.android.apis"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:label="@string/app_name"
            android:icon="@drawable/icon">
                <uses-library android:name="com.google.android.maps" />
         <activity android:name=".MapViewDemo" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" 
/>
</manifest>

Any help welcome.

Andre

--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by Andr茅 Charles Legendre » Wed, 22 Apr 2009 01:29:18 GMT


 Hi

Finally, my error was to left maps.jar in the classpath

Now, this very simple Map app with 1.5 SDK launch good

Thank for all the responses. It helps a lot.

Andre

--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by brian.schimmel » Mon, 25 May 2009 20:48:43 GMT


 i everybody,

I'm getting the same problems. Of course I have read this thread and
tried everything that was suggested (and some more), but it does not
work. Here are the facts:
* Using SDK 1.5_r1
* Project target in Eclipse is "Google APIs 1.5"
* AndroidManifest.xml contains <uses-sdk android:minSdkVersion="3" />
inside the manifest element
* AndroidManifest.xml contains <uses-library
android:name="com.google.android.maps" /> inside the application
element
* maps.jar is NOT added manually to the buildpath, but is shown under
Project -> Google APIs -> maps.jar
* The maps key is setup properly (that is, worked before switching to
1.5)
* code works when compiled againt the 1.1 API, but I need to compile
for 1.5 because I want to provide a Widget.

On the emulator (Firmware 1.5, google_sdk_eng 1.5 CUPCAKE 147336 test-
keys, the one that comes with DSK 1.5_r1) I get this:

05-25 12:33:40.554: INFO/ActivityManager(568): Starting activity:
Intent { comp={com.webxells.ourapp/.OurMapview} }
05-25 12:33:40.564: DEBUG/AndroidRuntime(819): Shutting down VM
05-25 12:33:40.564: WARN/dalvikvm(819): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
05-25 12:33:40.564: ERROR/AndroidRuntime(819): Uncaught handler:
thread main exiting due to uncaught exception
05-25 12:33:40.584: ERROR/AndroidRuntime(819):
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.webxells.ourapp/.OurMapview}; have you declared
this activity in your AndroidManifest.xml?
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1480)
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
android.app.Activity.startActivityForResult(Activity.java:2656)
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
android.app.Activity.startActivity(Activity.java:2700)
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
com.webxells.ourapp.CommonUi.onOptionsItemSelected(CommonUi.java:64)
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
com.webxells.ourapp.OurAppStart.onOptionsItemSelected(OurAppStart.java:
22)
05-25 12:33:40.584: ERROR/AndroidRuntime(819): at
android.app.Activity.onMenuItemSelected(Activity.java:2085)
... some more...

Of course, the activity is declared in the AndroidManifest.xml, and
this declaration worked when compiling against the 1.1 API.

And on a real device (HTC Dev Phone 1, Firmware 1.5, dream_devphone-
userdebug 1.5 CRB21 147201 test-keys) I get another error, instead of
the one above:

05-25 12:17:34.764: WARN/dalvikvm(691): Unable to resolve superclass
of Lcom/webxells/ourapp/OurMapview; (100)
05-25 12:17:34.764: WARN/dalvikvm(691): Link of class 'Lcom/webxells/
ourapp/OurMapview;' failed
05-25 12:17:34.764: ERROR/dalvikvm(691): Could not find class
'com.webxells.ourapp.OurMapview', referenced from method
com.webxells.ourapp.CommonUi.onOptionsItemSelected
05-25 12:17:34.764: WARN/dalvikvm(691): VFY: unable to resolve const-
class 114 (Lcom/webxells/ourapp/OurMapview;) in Lcom/webxells/ourapp/
CommonUi;
05-25 12:17:34.764: WARN/dalvikvm(691): VFY: rejecting opcode 0x1c at
0x0045
05-25 12:17:34.764: WARN/dalvikvm(691): VFY: rejected Lcom/webxells/
ourapp/CommonUi;.onOptionsItem



maps api and 1.5

by Georgy » Tue, 07 Jul 2009 09:15:39 GMT


 ello Brian,

I am having your same issue. Were you able to solve it?

thanks

On May 25, 8:48am, "brian.schimmel" <brian.schim...@googlemail.com>
wrote:
--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by Spiral » Wed, 22 Jul 2009 01:22:57 GMT


 ame here.

On Jul 6, 8:45pm, Georgy <georgearna...@gmail.com> wrote:

--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by jagtap.jj » Thu, 30 Jul 2009 14:51:03 GMT


 efer this
http://www.anddev.org/viewtopic.php?p=24902#24902

On Jul 21, 10:12pm, Spiral <jmri...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



maps api and 1.5

by brian.schimmel » Thu, 30 Jul 2009 17:31:06 GMT


 ell, in the end I couldn't get Google Maps to run on 1.5 no matter
how hard I tried. Now I'm happily using OpenStreetMap, which was up
and running in 15 minutes, but needed one or two days of tweeking
until it met my needs. See
http://www.anddev.org/openstreetmap_mapview_for_android-t2967.html

Anyway, that's nothing compared to the many days I spend trying to get
Google Maps working along with a Widget. The thread
http://groups.google.com/group/android-developers/browse_thread/thread/7ce1902505bba25a/f915dcb6d1ee6f19?lnk=gst&q=maps+widget#f915dcb6d1ee6f19
states that this is currently impossible anyway.

Anyway, some of you might acutally need to use Google Maps, and I hope
that there will be some clarification for everyone who still
experiences difficulties and a bugfix in the next SDK version.

On 30 Jul., 08:50, "jagtap.jj" <jagtap...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Symbian going for netbooks as well?

http://www.allaboutsymbian.com/news/item/9321_Symbian_1_running_on_Intel_Ato.php

Al.
--~--~---------~--~----~------------~-------~--~----~

2. When to display/hide ZoomControls for ImageView

Hi,

I'm not sure when I should let the ZoomControls visible or invisible
for an ImageView. Is it correct to display it in ImageView's
onLongClick event, and hide it in onClick event?

Thanks,
Derek
--~--~---------~--~----~------------~-------~--~----~

3. Only first control displays

4. Open GL and GLContext

5. inject long home key press

6. How to develop a app for android?

7. ALSA sound: Unable to attach mixer