Android Question Crash upon installation to Nexus 7

ValDog

Active Member
Licensed User
Longtime User
Ok, so I'm using v5.5 and was doing OK until yesterday. The only thing that I've changed is to update my Android SDK to API 23 (and then copied the google-play-services.jar file to my additional libraries folder).

So, now I am getting a crash upon installing to my Nexus 7 via USB:

ParseApplication.onCreate xml Id = 2131034112
data null
data1 XUwp9nsJSj6A095Ebb8sOwfeWCD6Fs78HivNQFQD
data2 3eXqiV8kRhMwx1BZsFwzb25gQSg1wJrwrFTce2v6
** Activity (main) Create, isFirst = true **
main_activity_create (B4A line: 305)
If FirstTime Then FusedLocationProvider1.Initiali
java.lang.NoClassDefFoundError: android.support.v4.util.ArrayMap
at com.google.android.gms.common.api.GoogleApiClient$Builder.<init>(Unknown Source)
at uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProvider.<init>(FusedLocationProvider.java:36)
at uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.Initialize(FusedLocationProviderWrapper.java:172)
at b4a.gsight2.main._activity_create(main.java:1344)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at b4a.gsight2.main.afterFirstLayout(main.java:102)
at b4a.gsight2.main.access$000(main.java:17)
at b4a.gsight2.main$WaitForLayout.run(main.java:80)
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:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)


Can anyone give me a clue as to what the problem may be?
 

walterf25

Expert
Licensed User
Longtime User
Ok, so I'm using v5.5 and was doing OK until yesterday. The only thing that I've changed is to update my Android SDK to API 23 (and then copied the google-play-services.jar file to my additional libraries folder).

So, now I am getting a crash upon installing to my Nexus 7 via USB:

ParseApplication.onCreate xml Id = 2131034112
data null
data1 XUwp9nsJSj6A095Ebb8sOwfeWCD6Fs78HivNQFQD
data2 3eXqiV8kRhMwx1BZsFwzb25gQSg1wJrwrFTce2v6
** Activity (main) Create, isFirst = true **
main_activity_create (B4A line: 305)
If FirstTime Then FusedLocationProvider1.Initiali
java.lang.NoClassDefFoundError: android.support.v4.util.ArrayMap
at com.google.android.gms.common.api.GoogleApiClient$Builder.<init>(Unknown Source)
at uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProvider.<init>(FusedLocationProvider.java:36)
at uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.Initialize(FusedLocationProviderWrapper.java:172)
at b4a.gsight2.main._activity_create(main.java:1344)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at b4a.gsight2.main.afterFirstLayout(main.java:102)
at b4a.gsight2.main.access$000(main.java:17)
at b4a.gsight2.main$WaitForLayout.run(main.java:80)
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:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)


Can anyone give me a clue as to what the problem may be?
It seems that you might be missing the V4 support library!

Walter
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
Walt, thanks for replying!

I went to my SDK Manager and installed Android Support Library Rev. 23.1.1, and then copied the updated android-support-v4.jar file to my additional libraries folder - restarted B4A, compiled and got the same error. Any other thoughts? Anyone?
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
This is getting to be a pain in the neck. I guess the android.support.v4.util.ArrayMap class functionality is being accessed by the FusedLocationProvider - is that correct. So would I be correct in assuming that Android API 23 has changed something to screw up the linkage? It had been working fine before.

I've looked at the documentation for #AdditionalJar, but it is not really obvious as to what I need to do to implement it in this instance...
 
Last edited:
Upvote 0

walterf25

Expert
Licensed User
Longtime User
This is getting to be a pain in the neck. I guess the android.support.v4.util.ArrayMap class functionality is being accessed by the FusedLocationProvider - is that correct. So would I be correct in assuming that Android API 23 has changed something to screw up the linkage? It had been working fine before.

I've looked at the documentation for #AdditionalJar, but it is not really obvious as to what I need to do to implement it in this instance...
Are you adding the path to the additional resources folder, i think i remember seeing a post somewhere about that, not too sure!

Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Then my guess would be that something changed in the google play services jar file from the time this library was created to the latest one!

Walter
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
Then my guess would be that something changed in the google play services jar file from the time this library was created to the latest one!

Walter
I suspect you are right. I'm trying to figure out how to rollback the Android SDK...
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
I found previous versions of the google-play-services.jar (dated 6/12/15) and android-support-v4.jar (dated 5/7/13). The site documentation for the FusedLocationProvider library states that it is dependent on google-play-services, android-support-v4, and GPS libraries - and additionally, "If you're using Google Play Services version 27 then you need to use FusedLocationProvider version 1.30" - I'd been using version 1.10 (seemingly w/o any problem until I just recently updated my Android SDK - which then updated google-play-services to version 28). I don't know if my previous google-play-services.jar (dated 6/12/15) was version 27 or not.

In any event, I installed the FusedLocationProvider version 1.30 lib files and played around with different configurations of the google-play-services and android-support-v4 libs, and finally got my application to compile and load successfully to my USB-connected Nexus 7 using my previous versions of the google-play-services and android-support-v4 libs.

So, it would seem that the newer google-play-services and android-support-v4 libs are problematic with the use of the FusedLocationProvider lib.

I'd appreciate any other feedback on this subject...
 
Upvote 0
Top