0

while working on my project, realised that I have a problem with some of my options.

in this quastion I showed you how one of my options in the project crashes. then I realised its working in some other devices. I tried to figure out if the problem was the version of my project, but it wasn't. I took 2 completely the same LG g3 phones, and it worked in one, and in the other it crashed.

what could be the problem?

p.s, for some reason all my project looks old (design of buttons and edit text's looks from really old versions of android).

edit:

posted my error log's:

10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime: Process: com.example.hay.myapplication, PID: 1650
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hay.myapplication/com.example.hay.myapplication.UserCreatingActivity}: java.lang.NullPointerException: Attempt to get length of null array
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2367)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:148)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5274)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:  Caused by: java.lang.NullPointerException: Attempt to get length of null array
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.content.res.AssetManager.getResourceTextArray(AssetManager.java:235)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.content.res.Resources.getTextArray(Resources.java:479)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.widget.ArrayAdapter.createFromResource(ArrayAdapter.java:430)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at 

com.example.hay.myapplication.UserCreatingActivity.onCreate(UserCreatingActivity.java:46)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5977)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2367) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:148) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5274) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
10-06 09:55:00.378 1650-1650/com.example.hay.myapplication E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 
10-06 09:55:00.436 1100-1462/? E/WifiStateMachine:  ConnectedState !CMD_RSSI_POLL 2241 0 "HackerU_Student" 5c:a4:8a:4d:4b:bf rssi=-61 f=5220 sc=60 link=150 tx=10.5, 0.0, 0.0  rx=331.8 bcn=0 [on:0 tx:0 rx:0 period:3001] from screen [on:0 period:1005488979] gl rssi=-61 ag=0 ticks 0,0,34 ls-=0 [56,56,60,60,60] brc=0 lrc=0
10-06 09:55:00.436 1100-1462/? E/WifiStateMachine:  L2ConnectedState !CMD_RSSI_POLL 2241 0 "HackerU_Student" 5c:a4:8a:4d:4b:bf rssi=-61 f=5220 sc=60 link=150 tx=10.5, 0.0, 0.0  rx=331.8 bcn=0 [on:0 tx:0 rx:0 period:1] from screen [on:0 period:1005488980] gl rssi=-61 ag=0 ticks 0,0,34 ls-=0 [56,56,60,60,60] brc=0 lrc=0
10-06 09:55:00.563 15624-15624/? E/SessionManagerService: X = 1440 Y = 2560 Orientation = 1
10-06 09:55:00.652 6649-6672/? E/SQLiteLog: (2067) abort at 35 in [INSERT INTO context(context_name,end_time,context_family,module_id,version,sync_state_mod_time_millis,start_time,sync_state,context_id,time_type,proto_blob) VALUES (?,?,?,?,?,?,?,?,?,?,?)]: UNI
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase: Error inserting context_name=8 end_time=1444114500569 context_family=7 module_id=com.google.android.contextmanager.module.PowerConnectionModule version=1 sync_state_mod_time_millis=1444114500651 start_time=1444114427560 sync_state=0 context_id=3995b854-6956-430c-9226-592ae97959dd time_type=3 proto_blob=[B@327839e9
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: context.context_id (code 2067)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:787)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:926)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1572)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1442)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.q.al.a(SourceFile:408)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.q.al.b(SourceFile:383)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.q.al.a(SourceFile:349)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.q.al.b(SourceFile:376)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.g.a.j.a(SourceFile:58)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.g.a.a.run(SourceFile:52)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at com.google.android.contextmanager.g.i.handleMessage(SourceFile:215)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.os.Handler.dispatchMessage(Handler.java:102)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.os.Looper.loop(Looper.java:135)
10-06 09:55:00.692 6649-6672/? E/SQLiteDatabase:     at android.os.HandlerThread.run(HandlerThread.java:61)
10-06 09:55:00.988 15624-15624/? E/SessionManagerService: X = 2560 Y = 1440 Orientation = 2
10-06 09:55:02.508 23896-23896/? E/b: Unable to connect to the editor to retrieve text... will retry later
10-06 09:55:02.613 324-358/? E/GBMv2: DFP En is all cleared set to be enabled
10-06 09:55:02.613 324-358/? E/GBMv2: Set value is all cleared set the max
10-06 09:55:03.414 15619-15674/? E/audio_hw_primary: disable_snd_device: enter 2
10-06 09:55:03.451 1100-1462/? E/WifiStateMachine:  ConnectedState !CMD_RSSI_POLL 2241 0 "HackerU_Student" 5c:a4:8a:4d:4b:bf rssi=-63 f=5220 sc=60 link=150 tx=5.2, 0.0, 0.0  rx=325.9 bcn=0 [on:0 tx:0 rx:0 period:3001] from screen [on:0 period:1005491995] gl rssi=-63 ag=0 ticks 0,0,35 ls-=0 [56,56,60,60,60] brc=0 lrc=0
10-06 09:55:03.452 1100-1462/? E/WifiStateMachine:  L2ConnectedState !CMD_RSSI_POLL 2241 0 "HackerU_Student" 5c:a4:8a:4d:4b:bf rssi=-63 f=5220 sc=60 link=150 tx=5.2, 0.0, 0.0  rx=325.9 bcn=0 [on:0 tx:0 rx:0 period:1] from screen [on:0 period:1005491996] gl rssi=-63 ag=0 ticks 0,0,35 ls-=0 [56,56,60,60,60] brc=0 lrc=0
10-06 09:55:03.811 318-419/? E/ThermalEngine: [GPU_MON] 0 percent. Current Sampling Time is 1 sec
10-06 09:55:04.550 23896-23896/? E/b: Unable to connect to the editor to retrieve text... will retry later
Community
  • 1
  • 1
  • post your error logs, also check and post OS versions and build versions for both the devices – Rahul Tiwari Oct 06 '15 at 06:53
  • What's the code in line 46 of your "UserCreatingActivity"? Do you have localized strings and perhaps one of your devices is using a certain locale and the other isn't? We need the code to be able to tell you more. – kha Oct 06 '15 at 07:19
  • @RahulTiwari posted something, I hope it's the good ones – Mika Izmylove Oct 06 '15 at 07:22

1 Answers1

0

Ok after a lot of time, Ive got it:

I had 2 value files with the name "String", one was English and one was Hebrew, the problem was that i defined the array only in one of them, and the project couldn't reach it because in the error log showed that it couldn't find the array.

the second problem: I had a value file called "themes" and it changed all my design to an older design, after changing it in the layout it worked out.