I have changed package name of the project but when I tried to rum it shows the message "Unfortunately App has stopped".I had followed the following steps to change my package name Android Studio Rename Package
My logcat error is as follows:
08-04 18:08:54.806 27626-27626/com.Bubbles E/SQLiteLog﹕ (14) cannot open file at line 30046 of [9491ba7d73]
08-04 18:08:54.806 27626-27626/com.Bubbles E/SQLiteLog﹕ (14) os_unix.c:30046: (2) open(/data/data/com.confec/databases/confec.sqlite) -
08-04 18:08:54.807 27626-27626/com.Bubbles E/SQLiteDatabase﹕ Failed to open database '/data/data/com.confec/databases/confec.sqlite'.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:806)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:791)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:669)
at com.Bubbles.database.DataBaseHelper.checkDataBase(DataBaseHelper.java:95)
at com.Bubbles.database.DataBaseHelper.createDataBase(DataBaseHelper.java:58)
at com.Bubbles.MainActivity.onCreate(MainActivity.java:93)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
08-04 18:08:54.809 27626-27626/com.Bubbles D/AndroidRuntime﹕ Shutting down VM
08-04 18:08:54.809 27626-27626/com.Bubbles E/AndroidRuntime﹕ FATAL EXCEPTION: main
I appreciate any help and thanks in advance. :)
Related
Ive just recently released an application and checking crasalytics over the last couple of days and ive had a number of crashes relating to this error io.realm.Realm.getDefaultMediator. It seems to crash when i get the instance of realm. Ive pasted the stack trace below.
Fatal Exception: java.lang.ExceptionInInitializerError
at com.electropages.mobile.classes.AlertBackgroundService.getAllReminders(AlertBackgroundService.java:57)
at com.electropages.mobile.classes.AlertBackgroundService.onHandleIntent(AlertBackgroundService.java:52)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by io.realm.exceptions.RealmException: Could not find io.realm.DefaultRealmModuleMediator
at io.realm.Realm.getDefaultMediator(Realm.java:256)
at io.realm.Realm.<clinit>(Realm.java:165)
at com.electropages.mobile.classes.AlertBackgroundService.getAllReminders(AlertBackgroundService.java:57)
at com.electropages.mobile.classes.AlertBackgroundService.onHandleIntent(AlertBackgroundService.java:52)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by java.lang.ClassNotFoundException: io.realm.DefaultRealmModuleMediator
at java.lang.Class.classForName(Class.java)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at io.realm.Realm.getDefaultMediator(Realm.java:251)
at io.realm.Realm.<clinit>(Realm.java:165)
at com.electropages.mobile.classes.AlertBackgroundService.getAllReminders(AlertBackgroundService.java:57)
at com.electropages.mobile.classes.AlertBackgroundService.onHandleIntent(AlertBackgroundService.java:52)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by java.lang.NoClassDefFoundError: io/realm/DefaultRealmModuleMediator
at java.lang.Class.classForName(Class.java)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at io.realm.Realm.getDefaultMediator(Realm.java:251)
at io.realm.Realm.<clinit>(Realm.java:165)
at com.electropages.mobile.classes.AlertBackgroundService.getAllReminders(AlertBackgroundService.java:57)
at com.electropages.mobile.classes.AlertBackgroundService.onHandleIntent(AlertBackgroundService.java:52)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by java.lang.ClassNotFoundException: Didn't find class "io.realm.DefaultRealmModuleMediator" on path: DexPathList[[zip file "/data/app/com.electropages.mobile-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.electropages.mobile-2, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at java.lang.Class.classForName(Class.java)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at io.realm.Realm.getDefaultMediator(Realm.java:251)
at io.realm.Realm.<clinit>(Realm.java:165)
at com.electropages.mobile.classes.AlertBackgroundService.getAllReminders(AlertBackgroundService.java:57)
at com.electropages.mobile.classes.AlertBackgroundService.onHandleIntent(AlertBackgroundService.java:52)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
Based on the stacktrace and based on another crash we were having, i believe it may be something to do with MultiDex being enabled. The crashes were only appearing on Android 4. devices. However, if someone could just clarify it for me that would be great.
Just in case. Another issue that has been occuring is this one. Not sure if there linked as its happening on android 5 devices.
Fatal Exception: io.realm.exceptions.RealmMigrationNeededException: The SavedPart class is missing from the schema for this Realm.
at io.realm.SavedPartRealmProxy.validateTable(SavedPartRealmProxy.java:129)
at io.realm.DefaultRealmModuleMediator.validateTable(DefaultRealmModuleMediator.java:61)
at io.realm.Realm.initializeRealm(Realm.java:553)
at io.realm.Realm.createAndValidate(Realm.java:516)
at io.realm.Realm.create(Realm.java:471)
at io.realm.Realm.getInstance(Realm.java:389)
at io.realm.Realm.getInstance(Realm.java:351)
at io.realm.Realm.getInstance(Realm.java:332)
at com.electropages.mobile.classes.AlertBackgroundService.getAllReminders(AlertBackgroundService.java:57)
at com.electropages.mobile.classes.AlertBackgroundService.onHandleIntent(AlertBackgroundService.java:52)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
Hi just want to know what is the problem with this logcat error?
that error always show everytime i run the application, but even it has error the application is perfectly run and working..
just want to know what is the problem with this error..
10-06 13:53:16.379 79-96/? A/BatteryStatsImpl﹕ problem reading network stats
java.lang.IllegalStateException: problem parsing idx 1
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
at com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
at com.android.internal.os.BatteryStatsImpl.access$100(BatteryStatsImpl.java:76)
at com.android.internal.os.BatteryStatsImpl$Uid.computeCurrentTcpBytesReceived(BatteryStatsImpl.java:2457)
at com.android.internal.os.BatteryStatsImpl$Uid.getTcpBytesReceived(BatteryStatsImpl.java:2446)
at com.android.internal.os.BatteryStatsImpl.writeSummaryToParcel(BatteryStatsImpl.java:5437)
at com.android.internal.os.BatteryStatsImpl.writeLocked(BatteryStatsImpl.java:4836)
at com.android.internal.os.BatteryStatsImpl.writeAsyncLocked(BatteryStatsImpl.java:4818)
at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1652)
at com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1534)
Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:406)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
at com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
at com.android.internal.os.BatteryStatsImpl.access$100(BatteryStatsImpl.java:76)
at com.android.internal.os.BatteryStatsImpl$Uid.computeCurrentTcpBytesReceived(BatteryStatsImpl.java:2457)
at com.android.internal.os.BatteryStatsImpl$Uid.getTcpBytesReceived(BatteryStatsImpl.java:2446)
at com.android.internal.os.BatteryStatsImpl.writeSummaryToParcel(BatteryStatsImpl.java:5437)
at com.android.internal.os.BatteryStatsImpl.writeLocked(BatteryStatsImpl.java:4836)
at com.android.internal.os.BatteryStatsImpl.writeAsyncLocked(BatteryStatsImpl.java:4818)
at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1652)
at com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1534)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:390)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
at com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
at com.android.internal.os.BatteryStatsImpl.access$100(BatteryStatsImpl.java:76)
at com.android.internal.os.BatteryStatsImpl$Uid.computeCurrentTcpBytesReceived(BatteryStatsImpl.java:2457)
at com.android.internal.os.BatteryStatsImpl$Uid.getTcpBytesReceived(BatteryStatsImpl.java:2446)
at com.android.internal.os.BatteryStatsImpl.writeSummaryToParcel(BatteryStatsImpl.java:5437)
at com.android.internal.os.BatteryStatsImpl.writeLocked(BatteryStatsImpl.java:4836)
at com.android.internal.os.BatteryStatsImpl.writeAsyncLocked(BatteryStatsImpl.java:4818)
at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1652)
thanks,
Joe
As you can tell I am a newbie to Android :) and struggling with retrieving contacts list. I did add android.permission.READ_CONTACTS in AndroidManifest.xml but still it is not working. I am running it on Windows 10, in case if that makes any difference. Thanks in advance.
09-07 17:27:15.819 5272-5272/? I/art﹕ Not late-enabling -Xcheck:jni (already on)
09-07 17:27:15.819 5272-5272/? I/art﹕ Late-enabling JIT
09-07 17:27:15.821 5272-5272/? I/art﹕ JIT created with code_cache_capacity=2MB compile_threshold=1000
09-07 17:27:15.871 5272-5272/com.sr.phonecontactslist W/System﹕ ClassLoader referenced unknown path: /data/app/com.sr.phonecontactslist-1/lib/x86
09-07 17:27:15.879 5272-5272/com.sr.phonecontactslist D/AndroidRuntime﹕ Shutting down VM
09-07 17:27:15.879 5272-5272/com.sr.phonecontactslist E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.sr.phonecontactslist, PID: 5272
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sr.phonecontactslist/com.sr.phonecontactslist.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{15540fd 5272:com.sr.phonecontactslist/u0a59} (pid=5272, uid=10059) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{15540fd 5272:com.sr.phonecontactslist/u0a59} (pid=5272, uid=10059) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
at android.content.ContentResolver.query(ContentResolver.java:475)
at android.content.ContentResolver.query(ContentResolver.java:434)
at com.sr.phonecontactslist.MainActivity.onCreate(MainActivity.java:20)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I have a full fledged app ...I renamed its package name ... and tried to run but after displaying the first page it get crashed..
here is my logcat:
815-2815/com.Bubbles E/SQLiteLog﹕ (1) no such table: centers
08-06 14:12:22.164 2815-2815/com.Bubbles D/AndroidRuntime﹕ Shutting down VM
08-06 14:12:22.165 2815-2815/com.Bubbles E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.Bubbles, PID: 2815
android.database.sqlite.SQLiteException: no such table: centers (code 1): , while compiling: SELECT * FROM centers where centername='Delhi'
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1255)
at com.Bubbles.database.DataBaseHelper.getCityCode(DataBaseHelper.java:413)
at com.Bubbles.Login.GetCityCode(Login.java:233)
at com.Bubbles.Login.Insertvalues(Login.java:175)
at com.Bubbles.Login.access$400(Login.java:26)
at com.Bubbles.Login$3.onClick(Login.java:144)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
waiting for a help..thanks in advance
You did more things than package rename as the real cause is:
android.database.sqlite.SQLiteException: no such table: centers
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.