0
我試圖從教程創建我的第一個SQLite數據庫。當我嘗試切換到保存數據庫信息的活動時,它會崩潰。我正在使用onClickListener來啓動意圖。嘗試打開視圖數據庫活動時發現「未發現處理意圖的活動」
我的意圖代碼:
Intent i = new Intent("com.example.database.SQLVIEW");
startActivity(i);
我的清單:
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SQLView"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="com.example.database.SQLVIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
logcat的給我:
05-28 22:25:50.205: D/AndroidRuntime(688): Shutting down VM
05-28 22:25:50.205: W/dalvikvm(688): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
05-28 22:25:50.245: E/AndroidRuntime(688): FATAL EXCEPTION: main
05-28 22:25:50.245: E/AndroidRuntime(688): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.database.SQLVIEW }
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1545)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.Activity.startActivityForResult(Activity.java:3351)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.Activity.startActivityForResult(Activity.java:3312)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.Activity.startActivity(Activity.java:3522)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.Activity.startActivity(Activity.java:3490)
05-28 22:25:50.245: E/AndroidRuntime(688): at com.example.database.MainActivity.onClick(MainActivity.java:71)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.view.View.performClick(View.java:4084)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.view.View$PerformClick.run(View.java:16966)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.os.Handler.handleCallback(Handler.java:615)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.os.Handler.dispatchMessage(Handler.java:92)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.os.Looper.loop(Looper.java:137)
05-28 22:25:50.245: E/AndroidRuntime(688): at android.app.ActivityThread.main(ActivityThread.java:4745)
05-28 22:25:50.245: E/AndroidRuntime(688): at java.lang.reflect.Method.invokeNative(Native Method)
05-28 22:25:50.245: E/AndroidRuntime(688): at java.lang.reflect.Method.invoke(Method.java:511)
05-28 22:25:50.245: E/AndroidRuntime(688): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
05-28 22:25:50.245: E/AndroidRuntime(688): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
05-28 22:25:50.245: E/AndroidRuntime(688): at dalvik.system.NativeStart.main(Native Method)
感謝