An error is returned when a normal Activity jumps to MapActivity.
When you click a control from a normal Activity to jump to a class MyMapActivity that inherits MapActivity, an error is returned.
Log information:
E/AndroidRuntime (15631): fatal exception: main
E/AndroidRuntime (15631): java. lang. NoClassDefFoundError: xxx. xxx. MyMapActivity
Original 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);
Solution:
Add one to the Manifest file: <uses-library android: name = "com. google. android. maps"/>
Related code after modification:
<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:
Http://blog.csdn.net/cj_guangtou/article/details/6452803