按照http://abomby.blog.sohu.com/166121477.html配置了一下,在eclipse里面试图运行浏览器,结果出现这些errors:
具体是哪一个error使得我的应用程序stop unexpectedly?谢谢各位大虾!:dizzy:
01-24 12:46:22.983: ERROR/AndroidRuntime(516): FATAL EXCEPTION: main
01-24 12:46:22.983: ERROR/AndroidRuntime(516): java.lang.RuntimeException: Unable to start activity ComponentInfo{wjc.android.browser/wjc.android.browser.BrowserActivity}: java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.os.Handler.dispatchMessage(Handler.java:99)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.os.Looper.loop(Looper.java:123)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at java.lang.reflect.Method.invokeNative(Native Method)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at java.lang.reflect.Method.invoke(Method.java:521)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at dalvik.system.NativeStart.main(Native Method)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): Caused by: java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at wjc.android.browser.TitleBar.setProgress(TitleBar.java:323)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at wjc.android.browser.BrowserActivity.onCreate(BrowserActivity.java:220)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-24 12:46:22.983: ERROR/AndroidRuntime(516): ... 11 more
Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER
按照http://choujinoffice.blog.163.co ... 405120109267538763/ 修改AndroidManifest.xml中的 中的android:authorities的值,避免Provider重名 java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable 注释掉了TitleBar.java:323 //((Animatable) mCircularProgress).stop(); ERROR/AndroidRuntime(306): Caused by: java.lang.SecurityException: Permission Denial: reading com.android.browser.BrowserProvider uri content://browser/bookmarks from pid=306, uid=10038 requires com.android.browser.permission.READ_HISTORY_BOOKMARKS 把AndroidManifest.xml里的所有 wjc.android.browser.permission.READ_HISTORY_BOOKMARKS改回com.android.browser.permission.READ_HISTORY_BOOKMARKS, wjc.android.browser.permission.WRITE_HISTORY_BOOKMARKS改回com.android.browser.permission.WRITE_HISTORY_BOOKMARKS 即可 ERROR/AndroidRuntime(346): FATAL EXCEPTION: main ERROR/AndroidRuntime(346): java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable ERROR/AndroidRuntime(346): at wjc.android.browser.TitleBar.setProgress(TitleBar.java:342) 注释掉了TitleBar.java:342 //((Animatable) mCircularProgress).start();