Ok, i am trying to build an app using the open source tree and the
google maps jar from the SDK.
Following what the other apps do with the google login client i
created a LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES with the following
makefile
(frameworks/opt/com.google.android.maps/Android.mk)
LOCAL_PATH := $(my-dir)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := googlemaps-
client:maps-7_r01.jar
include $(BUILD_MULTI_PREBUILT)
Then in my app package i have the following in my make file.
LOCAL_STATIC_JAVA_LIBRARIES := googlemaps-client
My manifest has
<uses-library android:name="com.google.android.maps" />
And i can build my application without any problems. Though when i
come to run it on my device i get the following error:
W/dalvikvm( 6747): Class resolved by unexpected DEX: Lcom/smmobileapps/
sviewer/SViewer;(0x44e4e998):0x11ebf8 ref [Lcom/google/android/maps/
MapActivity;] Lcom/google/android/maps/MapActivity;(0x44e4e998):
0x142528
W/dalvikvm( 6747): (Lcom/smmobileapps/sviewer/SViewer; had used a
different Lcom/google/android/maps/MapActivity; during pre-
verification)
W/dalvikvm( 6747): Unable to resolve superclass of Lcom/smmobileapps/
sviewer/SViewer; (149)
W/dalvikvm( 6747): Link of class 'Lcom/smmobileapps/sviewer/SViewer;'
failed
D/AndroidRuntime( 6747): Shutting down VM
W/dalvikvm( 6747): threadid=3: thread exiting with uncaught exception
(group=0x4001b178)
E/AndroidRuntime( 6747): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 6747): java.lang.NoClassDefFoundError:
com.smmobileapps.sviewer.SViewer
E/AndroidRuntime( 6747): at com.smmobileapps.SMMobileApps
$1.onItemClick(SMMobileApps.java:152)
E/AndroidRuntime( 6747): at
android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/AndroidRuntime( 6747): at
android.widget.Gallery.onSingleTapUp(Gallery.java:864)
E/AndroidRuntime( 6747): at
android.view.GestureDetector.onTouchEvent(GestureDetector.java:506)
E/AndroidRuntime( 6747): at
android.widget.Gallery.onTouchEvent(Gallery.java:839)
E/AndroidRuntime( 6747): at
android.view.View.dispatchTouchEvent(View.java:3709)
E/AndroidRuntime( 6747): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:852)
E/AndroidRuntime( 6747): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 6747): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 6747): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 6747): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 6747): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
E/AndroidRuntime( 6747): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
1107)
E/AndroidRuntime( 6747): at
android.app.Activity.dispatchTouchEvent(Activity.java:2061)
E/AndroidRuntime( 6747): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
E/AndroidRuntime( 6747): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
E/AndroidRuntime( 6747): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6747): at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 6747): at
android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 6747): at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6747): at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 6747): at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 6747): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 6747): at
dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 6747): Caused by: java.lang.IllegalAccessError:
Class ref in pre-verified class resolved to unexpected implementation
E/AndroidRuntime( 6747): at
dalvik.system.DexFile.defineClass(Native Method)
E/AndroidRuntime( 6747): at
dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
E/AndroidRuntime( 6747): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
E/AndroidRuntime( 6747): at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime( 6747): at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime( 6747): ... 24 more
Can anyone help me figure out what i am doing wrong here?
Obviously i can just make this activity with the SDK, but my
application is designed to run on a custom build and the MapActivity
would then have downloaded and updated separately from the main
application package. Which can be annoying for the end user.
Ne0
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to
android-...@googlegroups.com.
To unsubscribe from this group, send email to
android-platfo...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/android-platform?hl=en.