Thanks, but no luck. I get the exact same error :-/


On 26 June 2010 22:35, HeHe <cnm...@gmail.com> wrote:

> it should be possible. one way is to put a framelayout on xml and in
> activity do sxth like:
>
> mapview mview=new mapview(this,getString(R.string.mapkey));
>
> framelayout frame=(framelayout)findViewById(R.id.frame);
>
> bframe.addView(mview,0,new
> framelayout.layoutparams(FILL_PARENT,FILL_PARENT));
>
>
> On Jun 26, 12:52 pm, ThomasWrobel <darkfl...@gmail.com> wrote:
> > I've been trying to use a mapView in my app, and have been following
> > the tutorial;
> http://developer.android.com/resources/tutorials/views/hello-mapview....
> >
> > However, I'd like to be able to generate the mapView at runtime, and
> > assign it to a widget container. (rather then just having it as the
> > route element in Main.xml as in the example).
> >
> > Is this possible?
> >
> > I tried just extending mapActivity as stated, and implementing the
> > overrides.
> > However, at the moment I'm getting this error;
> >
> > "06-26 21:31:20.946: ERROR/AndroidRuntime(1845):
> > java.lang.IllegalAccessError: Class ref in pre-verified class resolved
> > to unexpected implementation
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > dalvik.system.DexFile.defineClass(Native Method)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:573)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:532)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.app.Instrumentation.newActivity(Instrumentation.java:1021)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 2489)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> > 2621)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.app.ActivityThread.access$2200(ActivityThread.java:126)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.os.Looper.loop(Looper.java:123)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > android.app.ActivityThread.main(ActivityThread.java:4595)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > java.lang.reflect.Method.invoke(Method.java:521)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > com.android.internal.os.ZygoteInit
> > $MethodAndArgsCaller.run(ZygoteInit.java:860)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> > 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
> > dalvik.system.NativeStart.main(Native Method)
> > "
> >
> > Which I think might be because theres no where in my code or xml at
> > the moment that defines where the mapView actually goes.
> > I can't figure out how to assign it. (in this case to a page in my
> > tabHost)
>
> --
> 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<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
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