joshbeck wrote:
> I am trying to extend the MapActivity class, but it's stumping me
> tonight.
> Notes: The first
> This post contains:
>      -Working Code
>      -Non-Working Code
>             --I only change the extend MapActivity line and add
> unimplemented isRouteDisplayed() --
>      -Error Log
> 
> Any Insight is Appreciated. Thank you all so much!
> 
> (Imports omitted)
> Working Code:
> =========================================
> ---------Begin Working Code-------
> public class GpsTest extends Activity{
>     public String test;
>       TextView mine;
> 
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>         mycontrols();
> 
>     }
> public void mycontrols()
> {
> 
>       mine = (TextView)findViewById(R.id.mytext);
>     test = "Wassup";
>       mine.setText(test);
> }
> }
> --------End Working Code----
> 
> ==========================================
> 
> --------Begin Non-Working Code---
> //Now I'm extending MapActivity
> public class GpsTest extends MapActivity{
>     public String test;
>       TextView mine;
> 
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>         mycontrols();
> 
>     }
> public void mycontrols()
> {
> 
>       mine = (TextView)findViewById(R.id.mytext);
>     test = "Wassup";
>       mine.setText(test);
> }
> //required override
> @Override
>       protected boolean isRouteDisplayed() {
>               // TODO Auto-generated method stub
>               return false;
>       }
> }
> 
> ----End Non Working Code----
> 
> ============================================
> 
> ---- Error Log ---- (Truncated)
> 
> 
> 11-14 05:29:56.810: ERROR/AndroidRuntime(725): Uncaught handler:
> thread main exiting due to uncaught exception
> 11-14 05:29:56.821: ERROR/AndroidRuntime(725):
> java.lang.RuntimeException: Unable to instantiate activity
> ComponentInfo{com.android.gpstest/com.android.gpstest.GpsTest}:
> java.lang.ClassNotFoundException: com.android.gpstest.GpsTest in
> loader [EMAIL PROTECTED]
> 
> ----End Error Log----

Do you have the <uses-library android:name="com.google.android.maps" /> 
element properly positioned in your AndroidManifest.xml file?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to