I am trying to create a virtual table using fts4 with external content table. The app works fine on API 23 but when I ran it on API 16 it crashed.
Create statement :
String DDL_FTS_TODO_TABLE = "CREATE VIRTUAL TABLE "+TBL_VIRTUAL_TODO+" USING fts4(content=\""+TBL_TODO+"\", "+
COL_TODO_TITLE +", "+COL_TODO_TITLE +", "+COL_TODO_DUE_DATE+"," +COL_TODO_ALARMDATE+","+ COL_TODO_REPEAT+", "+COL_TODO_LIST_ID+")";
My logcat :
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity {com.example.recyclerviewtest/com.example.recyclerviewtest.HomeActivity}:
android.database.sqlite.SQLiteException: vtable constructor failed: virtual_todo (code 1)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2596)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2624)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2101)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException: vtable constructor failed: virtual_todo (code 1)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:738)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1675)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1602)
at com.example.recyclerviewtest.database.TodoOpenHelper.onCreate(TodoOpenHelper.java:32)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:188)
at com.example.recyclerviewtest.database.TodoContentProvider.query(TodoContentProvider.java:52)
at android.content.ContentProvider.query(ContentProvider.java:652)
at android.content.ContentProvider$Transport.query(ContentProvider.java:189)
at android.content.ContentResolver.query(ContentResolver.java:370)
at android.content.ContentResolver.query(ContentResolver.java:313)
at com.example.recyclerviewtest.database.TodoDbHelper.getAllLists(TodoDbHelper.java:123)
at com.example.recyclerviewtest.HomeActivity.onResume(HomeActivity.java:110)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1184)
at android.app.Activity.performResume(Activity.java:5082)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2586)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2624)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2101)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Related
Usb debugging in my mobile has stopped working. The application is not installing via USB.Earlier It was working fine.I am attaching logs. Please help me to find out error.
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at
android.support.v4.app.SupportActivity.(SupportActivity.java:96)
at
android.support.v4.app.BaseFragmentActivityApi14.(BaseFragmentActivityApi14.java:28)
at
android.support.v4.app.BaseFragmentActivityApi16.(BaseFragmentActivityApi16.java:34)
at
android.support.v4.app.FragmentActivity.(FragmentActivity.java:67)
at
android.support.v7.app.AppCompatActivity.(AppCompatActivity.java:61)
at com.kpfactors_mbl.bizfactors.Login.(Login.java:68)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library:
reloc_library[1307]: 1842 cannot locate '__isnanf'...at
java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at
com.android.tools.profiler.support.ProfilerService.(ProfilerService.java:41)
at
android.support.v4.app.SupportActivity.(SupportActivity.java:96)
at
android.support.v4.app.BaseFragmentActivityApi14.(BaseFragmentActivityApi14.java:28)
at
android.support.v4.app.BaseFragmentActivityApi16.(BaseFragmentActivityApi16.java:34)
at
android.support.v4.app.FragmentActivity.(FragmentActivity.java:67)
at
android.support.v7.app.AppCompatActivity.(AppCompatActivity.java:61)
at com.kpfactors_mbl.bizfactors.Login.(Login.java:68)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
at dalvik.system.NativeStart.main(Native Method)
I am building a chat app using Firebase. When I want to test my app this error shows and the app crashes. The error is:
09-26 17:27:38.437 29482-29482/shashoug.com.zoolisd E/AndroidRuntime: FATAL EXCEPTION: main
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)
at android.app.ActivityThread.access$700(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "shashoug.com.zoolisd.MainActivity" on path: /data/app/shashoug.com.zoolisd-2.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1071)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2171)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)
at android.app.ActivityThread.access$700(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
09-26 17:27:40.079 29482-29482/? I/Process: Sending signal. PID: 29482 SIG: 9
As it was said in earlier answers, just try:
Build - Clean project, after that
Build - Rebuild project.
Also, if it doesn't help, try File - Invalidate Caches/Restart - Invalidate.
After all of above, delete app from your device and install it again.
03-24 10:51:22.425 20219-20219/com.mordred.call E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114)
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28)
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150)
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47)
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63)
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1036)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:803)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Native method not found: com.plivo.endpoint.backend.plivoJNI.swig_module_init:()V
at com.plivo.endpoint.backend.plivoJNI.swig_module_init(Native Method)
at com.plivo.endpoint.backend.plivoJNI.<clinit>(plivoJNI.java:108)
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114)
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28)
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150)
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47)
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63)
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
I am using the plivo api, but when i open an activity, i get that error above, i know its coming from my endpoint instantiation, i.e i cannot do this
Endpoint endpoint = Endpoint.newInstance(true, this);
but i do not know what to do instead and i do not know what is causing the error
Plivo Sales Engineer here.
What's the processor architecture of the android phone that you're testing on? This error occurs when the libpjplivo.so file is incompatible with the processor architecture.
Please raise a ticket our support portal and we can help you debug this.
My Navigation Drawer a part of this
And in Android 4.X actionBarDrawerToggle.syncState(); error , but Android 5.X not have this error...
actionBarDrawerToggle.setDrawerIndicatorEnabled(true);
drawerLayout.setDrawerListener(actionBarDrawerToggle);
actionBarDrawerToggle.syncState();
and this my error logcat
04-12 13:45:08.037 22518-22518/com.example.yi.flinkservice E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.yi.flinkservice/com.example.yi.flinkservice.MainActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x7f070053
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2073)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2098)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1204)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4872)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f070053
at android.content.res.Resources.getText(Resources.java:230)
at android.content.Context.getText(Context.java:283)
at android.support.v7.widget.Toolbar.setNavigationContentDescription(Toolbar.java:718)
at android.support.v7.app.ActionBarDrawerToggle$ToolbarCompatDelegate.setActionBarDescription(ActionBarDrawerToggle.java:642)
at android.support.v7.app.ActionBarDrawerToggle$ToolbarCompatDelegate.setActionBarUpIndicator(ActionBarDrawerToggle.java:634)
at android.support.v7.app.ActionBarDrawerToggle.setActionBarUpIndicator(ActionBarDrawerToggle.java:457)
at android.support.v7.app.ActionBarDrawerToggle.syncState(ActionBarDrawerToggle.java:246)
at com.example.yi.flinkservice.MainActivity.onCreate(MainActivity.java:230)
at android.app.Activity.performCreate(Activity.java:5191)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1082)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2037)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2098)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1204)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4872)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
thanks to Help !
Actually this is not a error of actionBarDrawerToggle.syncState(); method but when you call this, the string which you set is not found please check your string is available in both value folder value and value-21 and not then set in both.
It started on an Android phone, simple create statement in a file inside the assets/migrations folder (I use a 3rd party library called ActiveAndroid and for 2 years it worked okay - I did not changed anything about that):
CREATE TABLE IF NOT EXISTS Car (Brand TEXT);
I get this exception:
04-07 15:31:36.683 15738-15738/? E/SQLiteLog﹕ (21) API called with NULL prepared statement
04-07 15:31:36.683 15738-15738/? E/SQLiteLog﹕ (21) misuse at line 63243 of [00bb9c9ce4]
java.lang.RuntimeException: Unable to create application com.activeandroid.app.Application: android.database.sqlite.SQLiteException: not an error (code 0)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4394)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException: not an error (code 0)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:727)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1665)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1594)
at com.activeandroid.DatabaseHelper.executeSqlScript(DatabaseHelper.java:185)
at com.activeandroid.DatabaseHelper.executeMigrations(DatabaseHelper.java:155)
at com.activeandroid.DatabaseHelper.onUpgrade(DatabaseHelper.java:78)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:257)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.activeandroid.Cache.openDatabase(Cache.java:104)
at com.activeandroid.Cache.initialize(Cache.java:77)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:43)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:30)
at com.activeandroid.app.Application.onCreate(Application.java:25)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1000)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4391)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
So I checked it on my computer with a Firefox addon called SQLite Manager and created a brand new file (the file is totally unrelated to the Android database).
I used this select and on the last error I get this:
It seems that every SQLite statement is a not an error statement.
Unfortunately, Android can't handle that.
What should I do?
It seems that the upgrade script in the assets\migration folder had some empty lines and that caused the not an error.