Please people! Please!

On Jul 25, 10:13 pm, "renegadea...@googlemail.com"
<renegadea...@googlemail.com> wrote:
> Right so I have a button on an appwidget and when i click it I starts
> an activity which looks as follows:
>
> [code]
> package andy.driverwidget;
>
> import java.util.List;
>
> import android.os.Bundle;
> import andy.driverwidget.R;
>
> import com.google.android.maps.MapActivity;
> import com.google.android.maps.MapController;
> import com.google.android.maps.MapView;
> import com.google.android.maps.MyLocationOverlay;
> import com.google.android.maps.Overlay;
>
> public class MyLocation extends MapActivity{
>         public void onCreate(Bundle icicle) {
>                           super.onCreate(icicle);
>
>                           setContentView(R.layout.main);
>
>                           MapView myMapView = 
> (MapView)findViewById(R.id.mapview);
>                           MapController mapController = 
> myMapView.getController();
>
>                           List<Overlay> overlays = myMapView.getOverlays();
>                           MyLocationOverlay myLocationOverlay = new 
> MyLocationOverlay(this,
> myMapView);
>                           overlays.add(myLocationOverlay);
>                           myLocationOverlay.enableMyLocation();
>                         }
>
>                           protected boolean isRouteDisplayed() {
>
>                             return false;
>                           }
>
> }
>
> [/code]
>
> However what happens is the following error occurs:
>
> [code]
> 07-25 22:12:42.046: DEBUG/LocationManagerService(585): installing
> network location provider
> 07-25 22:12:42.197: DEBUG/MediaScannerService(695): start scanning
> volume internal
> 07-25 22:12:42.487: INFO/ActivityManager(585): Start proc
> andy.driverwidget for broadcast andy.driverwidget/.WordWidget: pid=709
> uid=10021 gids={3003}
> 07-25 22:12:43.256: WARN/dalvikvm(709): Unable to resolve superclass
> of Landy/driverwidget/MyLocation; (53)
> 07-25 22:12:43.288: WARN/dalvikvm(709): Link of class 'Landy/
> driverwidget/MyLocation;' failed
> 07-25 22:12:43.288: ERROR/dalvikvm(709): Could not find class
> 'andy.driverwidget.MyLocation', referenced from method
> andy.driverwidget.WordWidget.onReceive
> 07-25 22:12:43.297: WARN/dalvikvm(709): VFY: unable to resolve const-
> class 41 (Landy/driverwidget/MyLocation;) in Landy/driverwidget/
> WordWidget;
> 07-25 22:12:43.297: WARN/dalvikvm(709): VFY:  rejecting opcode 0x1c at
> 0x010d
> 07-25 22:12:43.308: WARN/dalvikvm(709): VFY:  rejected Landy/
> driverwidget/WordWidget;.onReceive (Landroid/content/Context;Landroid/
> content/Intent;)V
> 07-25 22:12:43.308: WARN/dalvikvm(709): Verifier rejected class Landy/
> driverwidget/WordWidget;
> 07-25 22:12:43.317: WARN/dalvikvm(709): Class init failed in
> newInstance call (Landy/driverwidget/WordWidget;)
> 07-25 22:12:43.328: DEBUG/AndroidRuntime(709): Shutting down VM
> 07-25 22:12:43.328: WARN/dalvikvm(709): threadid=3: thread exiting
> with uncaught exception (group=0x4000fe70)
> 07-25 22:12:43.337: ERROR/AndroidRuntime(709): Uncaught handler:
> thread main exiting due to uncaught exception
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709): java.lang.VerifyError:
> andy.driverwidget.WordWidget
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> java.lang.Class.newInstanceImpl(Native Method)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> java.lang.Class.newInstance(Class.java:1472)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> android.app.ActivityThread.handleReceiver(ActivityThread.java:2380)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> android.app.ActivityThread.access$2700(ActivityThread.java:112)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> android.os.Looper.loop(Looper.java:123)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> android.app.ActivityThread.main(ActivityThread.java:3948)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:782)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> 07-25 22:12:43.357: ERROR/AndroidRuntime(709):     at
> dalvik.system.NativeStart.main(Native Method)
> 07-25 22:12:43.378: DEBUG/dalvikvm(585): GREF has increased to 201
> 07-25 22:12:43.436: INFO/Process(585): Sending signal. PID: 709 SIG: 3
>
> [/code]
>
> My Manifest looks as follows and correctly shows the inclusion of the
> <uses-library> line.
>
> [code]
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>     package="andy.driverwidget"
>     android:versionCode="1"
>     android:versionName="1.0">
>
>     <application android:icon="@drawable/app_icon"
> android:label="@string/app_name">
>
>         <!-- Broadcast Receiver that will process AppWidget updates --
>
>         <receiver android:name=".WordWidget" android:label="@string/
> widget_name">
>             <intent-filter>
>                 <action
> android:name="android.appwidget.action.APPWIDGET_UPDATE" />
>
>             </intent-filter>
>             <intent-filter>
>                 <action
> android:name="android.provider.Telephony.SMS_RECEIVED" />
>
>                  </intent-filter>
>
>             <meta-data android:name="android.appwidget.provider"
> android:resource="@xml/widget_word" />
>         </receiver>
>
>         <activity android:name=".MyLocation"
>         android:label="myLocation">
>          </activity>
>           <activity android:name=".Configure"
>         android:label="Configure">
>          </activity>
>          <uses-library android:name="com.google.android.maps" />
>     </application>
>
>     <uses-permission android:name="android.permission.INTERNET" />
>     <uses-permission
> android:name="android.permission.WRITE_SECURE_SETTINGS" />
>     <uses-permission android:name="android.permission.WRITE_SETTINGS" /
>
>     <uses-permission android:name="android.permission.CALL_PHONE" />
>     <uses-permission android:name="android.permission.RECEIVE_SMS" />
>      <uses-permission android:name="android.permission.READ_SMS" />
>
>   <!--  <uses-sdk android:minSdkVersion="3" /> -->
>
> </manifest>
>
> [/code]
>
> My emulator is running the google apis 1.5 option - and the same error
> occurs running the app on the phone hardware itself.
>
> Somebody please help me because this is driving me insane and been
> bothering me for a long time now.

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

Reply via email to