When you click a control from a normal activity to jump to an inherited Mapactivity class mymapactivity, an error occurs.
Log information:
E/androidruntime (15631): FATAL exception:main
E/androidruntime (15631): java.lang.NoClassDefFoundError:xxx.xxx.MyMapActivity
Original related code:
<pre name= "code" class= "java" ><application android:name= "Com.etnet.android.MyApplication" android:icon= "@drawable/launcher" android:label= "@string/app_name" > <activity android:name= " Xxx.xxx.CompanySiteActivity "/></application>
Intent Intent = new Intent (this,mymapactivity.class); startactivity (Intent);
Workaround:
Add one to the manifest file: <uses-library android:name= "Com.google.android.maps"/>
The relevant code after the change:
<application android:name= "com.etnet.android.MyApplication" android:icon= "@drawable/launcher" Android:label= "@string/app_name" > <uses-library android:name= "Com.google.android.maps"/> < Activity android:name= "xxx.xxx.CompanySiteActivity"/></application>
Reference from:
http://blog.csdn.net/cj_guangtou/article/details/6452803
Normal activity jumps to mapactivity error