11-10 12:07:00.327: WARN/dalvikvm(558): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): FATAL EXCEPTION: main 11-10 12:07:00.357: ERROR/AndroidRuntime(558): java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.mutmonix.series/com.mutmonix.series.Main}: java.lang.ClassNotFoundException: com.mutmonix.series.Main in loader dalvik.system.PathClassLoader[/data/app/com.mutmonix.series-1.apk] 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 11-10 12:07:00.357: ERROR/AndroidRuntime(558):
at android.os.Handler.dispatchMessage(Handler.java:99) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.os.Looper.loop(Looper.java:123) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.ActivityThread.main(ActivityThread.java:4627) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at java.lang.reflect.Method.invokeNative(Native Method) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at java.lang.reflect.Method.invoke(Method.java:521) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at dalvik.system.NativeStart.main(Native Method) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): Caused by: java.lang.ClassNotFoundException: com.mutmonix.series.Main in loader dalvik.system.PathClassLoader[/data/app/com.mutmonix.series-1.apk] 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577) 11-10 12:07:00.357: ERROR/AndroidRuntime(558): ... 11 more 11-10 12:07:00.377: WARN/ActivityManager(68): Force finishing activity com.mutmonix.series/.Main 11-10 12:07:00.897: WARN/ActivityManager(68): Activity pause timeout for HistoryRecord{45027410 com.mutmonix.series/.Main}
Main. Java
package com.mutmonix.series.activities;
import com.mutmonix.series.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class Main extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
findViewById(R.id.link_BlueStone).setOnClickListener(this);
}
@Override
public void onClick(View v) {
if(v.getId()==R.id.link_BlueStone){
}
}
}
• 《刑法》:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mutmonix.series" android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>