在原 main.xml 中添加一个 webview 控件,没有用到SQLite,居然报错。
07-02 19:47:38.950: E/SQLiteDatabase(969): Failed to open the database. closing it.
07-02 19:47:38.950: E/SQLiteDatabase(969): android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1013)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:962)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1043)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1036)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:778)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:215)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.webkit.WebViewDatabase.initDatabase(WebViewDatabase.java:223)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.webkit.WebViewDatabase.init(WebViewDatabase.java:209)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.webkit.WebViewDatabase.access$000(WebViewDatabase.java:38)
07-02 19:47:38.950: E/SQLiteDatabase(969): at android.webkit.WebViewDatabase$1.run(WebViewDatabase.java:190)
07-02 19:47:38.950: W/dalvikvm(969): threadid=12: thread exiting with uncaught exception (group=0x409e01f8)
07-02 19:47:38.970: E/AndroidRuntime(969): FATAL EXCEPTION: Thread-103
07-02 19:47:38.970: E/AndroidRuntime(969): java.lang.NullPointerException
07-02 19:47:38.970: E/AndroidRuntime(969): at android.webkit.WebViewDatabase.initDatabase(WebViewDatabase.java:231)
07-02 19:47:38.970: E/AndroidRuntime(969): at android.webkit.WebViewDatabase.init(WebViewDatabase.java:209)
07-02 19:47:38.970: E/AndroidRuntime(969): at android.webkit.WebViewDatabase.access$000(WebViewDatabase.java:38)
07-02 19:47:38.970: E/AndroidRuntime(969): at android.webkit.WebViewDatabase$1.run(WebViewDatabase.java:190)
07-02 19:47:38.970: W/ActivityManager(144): Force finishing activity com.jw.Advertisement/.ADVActivity
想了很久不知道是哪里的问题。
后来把原来的APK删除, 重新安装APK ,居然好了。