i set values and inserted to database but i got the following errors in logcat.why
03-25 17:41:23.802: E/SQLiteDatabase(10095): Error inserting devicename=iname alarm=ON uuid=00000000-5f53-54ae-5f53-54ae00000000 light=ON
03-25 17:41:23.802: E/SQLiteDatabase(10095): android.database.sqlite.SQLiteConstraintException: column uuid is not unique (code 19)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1469)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at com.iname.bpowerbank.DataBaseAdapter.insertData(DataBaseAdapter.java:97)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at com.iname.bpowerbank.EditPreview.onCreate(EditPreview.java:68)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.Activity.performCreate(Activity.java:5231)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.ActivityThread.access$800(ActivityThread.java:135)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.os.Handler.dispatchMessage(Handler.java:102)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.os.Looper.loop(Looper.java:136)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at android.app.ActivityThread.main(ActivityThread.java:5017)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at java.lang.reflect.Method.invokeNative(Native Method)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at java.lang.reflect.Method.invoke(Method.java:515)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
03-25 17:41:23.802: E/SQLiteDatabase(10095): at dalvik.system.NativeStart.main(Native Method)
You violated a constraint on your uuid column. It must be unique. Insert always unique values.
Check this post to see sqlite error descriptions
Yours is #19.
There are two possible fixes,
1. Remove UNIQUE or PRIMARY KEY property for the column "uuid"
or
2. use INSERT OR REPLACE INTO table_name (UUID,name) VALUES ('uuid_value','name_value')
Related
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)
I'm trying to build a .jar library that developers can use in their own apps. I have 3 views (activities) in my library that I'd like developers to be able to present in their apps like this:
// Developer's activity
public class MainActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// This method returns an intent which calls
// an activity packaged in my .jar file
startActivity(EvelynsLibrary.showView(this));
}
}
The main library class EvelynsLibrary has a static 'showView' method which accepts an activity (to get context), creates an intent based on the context and an Activity bundled in my .jar, and returns an Intent, that the developer can show using startActivity.
Not sure if this is needed, but I have also added the external activity to the calling app's AndroidManifest.xml file like so:
<activity
android:name="com.evelyn.EvelynsActivity"
android:label="Evelyn"
android:configChanges="orientation|screenSize"
android:screenOrientation="fullSensor">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
I'm getting the following error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.evelyn.EvelynsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
Here is my entire error (Logcat) output:
11-19 02:52:30.760 597-642/? E/NetdConnector﹕ NDC Command {276 softap fwreload wlan0 STA} took too long (895ms)
11-19 02:52:35.245 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-19 12:05:26.209 597-642/? E/NetdConnector﹕ NDC Command {457 softap fwreload wlan0 STA} took too long (917ms)
11-19 12:05:30.793 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-19 12:05:34.167 1083-1354/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 12:05:38.191 1083-1354/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 12:08:56.234 2162-2162/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-19 12:08:56.274 2162-2162/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-19 23:18:00.632 1083-11946/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 23:18:03.515 1083-11946/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-19 23:36:43.087 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-20 01:03:10.368 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:03:10.488 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:03:17.034 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:04:16.552 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:05:18.422 13822-13822/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:13:00.193 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:13:25.428 14643-14643/? E/ActivityThread﹕ Activity com.choiceofgames.diabolical.Diabolical has leaked ServiceConnection com.anjlab.android.iab.v3.BillingProcessor$1#42b11268 that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.choiceofgames.diabolical.Diabolical has leaked ServiceConnection com.anjlab.android.iab.v3.BillingProcessor$1#42b11268 that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:979)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:873)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1561)
at android.app.ContextImpl.bindService(ContextImpl.java:1544)
at android.content.ContextWrapper.bindService(ContextWrapper.java:517)
at com.anjlab.android.iab.v3.BillingProcessor.bindPlayServices(BillingProcessor.java:102)
at com.anjlab.android.iab.v3.BillingProcessor.<init>(BillingProcessor.java:95)
at com.choiceofgames.choicescript.Billing.<init>(Billing.java:57)
at com.choiceofgames.choicescript.ChoiceScriptActivity.onCreate(ChoiceScriptActivity.java:191)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 01:13:27.760 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:13:57.899 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:14:27.999 14643-14643/? E/ActivityThread﹕ Failed to find provider info for
11-20 01:36:32.631 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:37:02.740 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:37:32.830 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:38:02.949 14643-14643/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
11-20 01:38:33.058 14643-14643/? E/ActivityThread﹕ Failed to find provider info for
11-20 11:13:03.752 597-642/? E/NetdConnector﹕ NDC Command {639 softap fwreload wlan0 STA} took too long (995ms)
11-20 11:13:08.276 597-644/? E/ConnectivityService﹕ Unexpected mtu value: android.net.wifi.WifiStateTracker#42bf90a8
11-20 11:13:11.629 1083-18466/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-20 11:13:15.303 1083-18466/? E/ActivityThread﹕ Failed to find provider info for com.google.android.wearable.settings
11-20 12:19:22.863 597-612/? E/WindowManager﹕ Starting window AppWindowToken{43a69c40 token=Token{42d66640 ActivityRecord{42840e90 u0 com.example.myExampleApp/.MyActivity t26}}} timed out
11-20 12:19:42.102 25049-25049/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myExampleApp, PID: 25049
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myExampleApp/com.example.myExampleApp.MyActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.content.ComponentName.<init>(ComponentName.java:77)
at android.content.Intent.<init>(Intent.java:3813)
at com.evelyn.EvelynsLibrary.showView(EvelynsLibrary.java:22)
at com.example.myExampleApp.MyActivity.onCreate(MyActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 12:42:19.597 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:42:19.597 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:42:20.377 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:42:20.377 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:42:20.698 26094-26100/com.example.myExampleApp E/jdwp﹕ Failed sending reply to debugger: Broken pipe
11-20 12:42:30.687 597-612/? E/WindowManager﹕ Starting window AppWindowToken{43f4bd98 token=Token{4311d8e8 ActivityRecord{42cefb90 u0 com.example.myExampleApp/.MyActivity t27}}} timed out
11-20 12:48:28.456 1083-1569/? E/PlayLoggerImpl﹕ Service was disconnected. Will try caching.
11-20 12:49:00.297 26565-26581/? E/libEGL﹕ validate_display:254 error 3008 (EGL_BAD_DISPLAY)
11-20 12:49:00.358 26565-26584/? E/OMXMaster﹕ A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
11-20 12:51:29.873 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:51:29.873 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:51:30.624 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:51:30.624 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:51:32.996 26719-26719/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myapp, PID: 26719
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.MyExampleStartActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.myapp/com.evelyn.EvelynsActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.myapp/com.evelyn.EvelynsActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
at android.app.Activity.startActivityForResult(Activity.java:3424)
at android.app.Activity.startActivityForResult(Activity.java:3385)
at android.app.Activity.startActivity(Activity.java:3627)
at android.app.Activity.startActivity(Activity.java:3595)
at com.example.myapp.MyExampleStartActivity.onCreate(MyExampleStartActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 12:51:33.977 10994-10994/? E/chromium﹕ [ERROR:layer_tree_host_impl.cc(2121)] Forcing zero-copy tile initialization as worker context is missing
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#4283e910)
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#4289b088)
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#42816e80)
11-20 12:51:38.232 833-841/? E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder#42a4b5b8)
11-20 12:53:44.995 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:53:44.995 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:53:45.786 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
11-20 12:53:45.786 833-833/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
11-20 12:53:47.988 597-610/? E/qcom_sensors_hal﹕ hal_process_time_resp: Resetting rollover count from 0 to 1
11-20 12:53:48.138 27195-27195/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myapp, PID: 27195
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.evelyn.EvelynsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:1123)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2309)
at android.content.res.Resources.getLayout(Resources.java:939)
at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1929)
at com.evelyn.EvelynsActivity.setLayout(MainActivity.java:34)
at com.evelyn.EvelynsActivity.onCreate(MainActivity.java:146)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
11-20 12:54:02.352 597-633/? E/InputDispatcher﹕ channel '42877b50 com.example.myapp/com.example.myapp.MyExampleStartActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
11-20 12:54:05.135 597-610/? E/qcom_sensors_hal﹕ hal_process_time_resp: Resetting rollover count from 0 to 1
11-20 12:54:05.275 27304-27304/com.example.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myapp, PID: 27304
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.evelyn.EvelynsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:1123)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2309)
at android.content.res.Resources.getLayout(Resources.java:939)
at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1929)
at com.evelyn.EvelynsActivity.setLayout(MainActivity.java:34)
at com.evelyn.EvelynsActivity.onCreate(MainActivity.java:146)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Question: Where am I going wrong? How can I achieve this and allow a developer to call my .jars activity?
You should create an Android Library project not a jar
While inputting decimal value sometimes i am getting NumberFormatException as i have restricted comma(,). In Crash Analytics it shows comma instead of dot even though i have replaced comma(,) by dot(.).
For Example :
.{main} java.lang.NumberFormatException: Invalid double: "1,00" at
java.lang.StringToReal.invalidReal(StringToReal.java:63) at
java.lang.StringToReal.parseDouble(StringToReal.java:269) at
java.lang.Double.parseDouble(Double.java:295) at
PackageName.ActivityName.MethodOne(ActivityName.java:112) at
PackageName.AnotherActivityName.onClick(AnotherActivityName.java:197) at
android.view.View.performClick(View.java:4640) at
android.view.View$PerformClick.run(View.java:19421) at
android.os.Handler.handleCallback(Handler.java:733) at
android.os.Handler.dispatchMessage(Handler.java:95) at
android.os.Looper.loop(Looper.java:136) at
android.app.ActivityThread.main(ActivityThread.java:5476) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:515) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at
dalvik.system.NativeStart.main(Native Method)
I get this exception while tinkering with Google Play Game Services - real time multiplayer. I was trying to create a room for automatch and this happen. This is strange because I have successfully created a multiplayer room many times before. I don't know what it is and how to avoid this?
07-30 14:48:06.103 1063-1063/com.google.android.gms E/RoomServiceClientStateMachine﹕ Unable to communicate with RAS
android.os.RemoteException: Service disconnected
at ffz.onServiceDisconnected(SourceFile:79)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1115)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1129)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
07-30 14:48:06.103 636-660/system_process W/DropBoxManagerService﹕ Dropping: SYSTEM_TOMBSTONE (1161 > 0 bytes)
07-30 14:48:06.113 1063-1063/com.google.android.gms I/RoomServiceClientStateMachine﹕ Unable to kill RAS (may already be dead)
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at ecm.a(SourceFile:388)
at ffv.b(SourceFile:111)
at ffz.onServiceDisconnected(SourceFile:79)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1115)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1129)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
07-30 14:48:06.113 636-965/system_process I/ActivityManager﹕ Process com.google.android.gms.room (pid 12294) has died.
07-30 14:48:06.143 180-180/? D/Zygote﹕ Process 12294 terminated by signal (11)
I am working on a project which has two modules , server and client.
Server will be running on OTT devices (Android based) as an background service and will be responsible to actuate/inject keyevents and client will be sending keyevents over wifi.
Now i am able to control single application which includes the Server service or I can say that i am able to control all those app which I have developed (using broadcast receiver , Instrumentation...etc).
Now i have to control other apps also , I mean I have to send the keyevents on global level
I have gone through several tutorials but still stuck at this.
Last thing which i need to try is to inject key events at low level using JNI but i am alien to JNI and low level linux subsystem !!
is there any other workaround ? any lead would be helpful
Thanks :D
these are my logcat values :-
03-25 16:12:06.422: E/Key Value(7679): 343
03-25 16:12:06.752: E/JavaBinder(8556): Unknown binder error code. 0xfffffff7
03-25 16:12:06.752: E/ServiceManager(8556): error in getService
03-25 16:12:06.752: E/ServiceManager(8556): android.os.RemoteException: Unknown binder error code. 0xfffffff7
03-25 16:12:06.752: E/ServiceManager(8556): at android.os.BinderProxy.transact(Native Method)
03-25 16:12:06.752: E/ServiceManager(8556): at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:123)
03-25 16:12:06.752: E/ServiceManager(8556): at android.os.ServiceManager.getService(ServiceManager.java:55)
03-25 16:12:06.752: E/ServiceManager(8556): at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1832)
03-25 16:12:06.752: E/ServiceManager(8556): at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1830)
03-25 16:12:06.752: E/ServiceManager(8556): at android.util.Singleton.get(Singleton.java:34)
03-25 16:12:06.752: E/ServiceManager(8556): at android.app.ActivityManagerNative.getDefault(ActivityManagerNative.java:74)
03-25 16:12:06.752: E/ServiceManager(8556): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
03-25 16:12:06.752: E/ServiceManager(8556): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
03-25 16:12:06.752: E/ServiceManager(8556): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
03-25 16:12:06.752: E/ServiceManager(8556): at dalvik.system.NativeStart.main(Native Method)
03-25 16:12:06.752: E/AndroidRuntime(8556): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
03-25 16:12:06.752: E/AndroidRuntime(8556): java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
03-25 16:12:06.752: E/AndroidRuntime(8556): at android.os.Parcel.readException(Parcel.java:1425)
03-25 16:12:06.752: E/AndroidRuntime(8556): at android.os.Parcel.readException(Parcel.java:1379)
03-25 16:12:06.752: E/AndroidRuntime(8556): at android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.java:356)
03-25 16:12:06.752: E/AndroidRuntime(8556): at android.hardware.input.InputManager.injectInputEvent(InputManager.java:619)
03-25 16:12:06.752: E/AndroidRuntime(8556): at com.android.commands.input.Input.injectKeyEvent(Input.java:201)
03-25 16:12:06.752: E/AndroidRuntime(8556): at com.android.commands.input.Input.sendKeyEvent(Input.java:163)
03-25 16:12:06.752: E/AndroidRuntime(8556): at com.android.commands.input.Input.run(Input.java:64)
03-25 16:12:06.752: E/AndroidRuntime(8556): at com.android.commands.input.Input.main(Input.java:41)
03-25 16:12:06.752: E/AndroidRuntime(8556): at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
03-25 16:12:06.752: E/AndroidRuntime(8556): at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
03-25 16:12:06.752: E/AndroidRuntime(8556): at dalvik.system.NativeStart.main(Native Method)
03-25 16:12:06.762: E/AndroidRuntime(8556): Error reporting crash
03-25 16:12:06.762: E/AndroidRuntime(8556): java.lang.NullPointerException
03-25 16:12:06.762: E/AndroidRuntime(8556): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
03-25 16:12:06.762: E/AndroidRuntime(8556): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
03-25 16:12:06.762: E/AndroidRuntime(8556): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
03-25 16:12:06.762: E/AndroidRuntime(8556): at dalvik.system.NativeStart.main(Native Method)