Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Example Crashing #641

Closed
Jayce2177 opened this issue Mar 5, 2018 · 8 comments
Closed

Example Crashing #641

Jayce2177 opened this issue Mar 5, 2018 · 8 comments

Comments

@Jayce2177
Copy link

I have followed the example for location by just copying and pasting it into my test app, but this line seems to crash it every time : locationEngine = new LostLocationEngine(LocationPluginActivity.this); with the only error message as :

03-04 22:09:01.962 11249-11249/? E/Zygote: v2
03-04 22:09:01.963 11249-11249/? E/Zygote: accessInfo : 0
03-04 22:09:02.017 11249-11263/? E/art: Failed sending reply to debugger: Broken pipe
03-04 22:09:07.312 11249-11249/com.tech.gm.testapp E/libc++abi: terminating with uncaught exception of type jni::PendingJavaException
03-04 22:09:07.312 11249-11249/com.tech.gm.testapp A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 11249 (m.testapp)

                                                         [ 03-04 

22:09:07.313 527: 527 W/ ]
debuggerd: handling request: pid=11249 uid=10497 gid=10497 tid=11249

@langsmith
Copy link
Contributor

@Jayce2177 ,

Try this new and improved way to get a locationEngine object 👇

locationEngine = new LocationEngineProvider(this).obtainBestLocationEngineAvailable();

Do you still get the same errors/crashing?

@Jayce2177
Copy link
Author

I had to add these two lines to my build.gradle to make it work. Not sure why this isn't put into the documentation.

compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.2.9'
compile 'com.mapbox.mapboxsdk:mapbox-android-telemetry:2.2.9@aar'

@Jayce2177
Copy link
Author

@langsmith So I had to try a different way cause my app wouldn't build final apk with those two lines, so I tried your way and now when I go to build my app I get the following errors:

Warning:com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerOptions: can't find referenced class com.google.auto.value.AutoValue
Warning:com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerOptions$Builder: can't find referenced class com.google.auto.value.AutoValue$Builder
Warning:com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerOptions$Builder: can't find referenced class com.google.auto.value.AutoValue
Warning:com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerOptions$Builder: can't find referenced class com.google.auto.value.AutoValue$Builder
Warning:okhttp3.internal.platform.ConscryptPlatform: can't find referenced class org.conscrypt.OpenSSLProvider
Warning:okhttp3.internal.platform.ConscryptPlatform: can't find referenced class org.conscrypt.Conscrypt

This is becoming so frustrating as there is very limited documentation or tutorials and the example apps don't even work without crashing or being able to generate a signed apk.

@langsmith
Copy link
Contributor

Ok, thanks for the feedback @Jayce2177 and for your patience. Yes, it can be frustrating at times. Mapbox has a growing number of fine grain Android tools and we're constantly improving our systems to keep things aligned.

This pr will be going into master soon and it fixes several issues with the app.

Your original post at the top of this ticket mentions the example for location, so my guess is that you're trying to use the location layer plugin for Android. Is that correct? Are you able to describe what you're trying to ultimately accomplish?

View the LocationPluginActivity on that pr (branch is ls-multiple-version-bump-hotfixes). That has a basic working example of using the location layer plugin for Android. Here is the dependencies.gradle file for that branch/pr and Mapbox dependencies. Like I said, this will all be on master very soon.

@langsmith
Copy link
Contributor

Also @Jayce2177 , are you experiencing complete app crashes or just the warnings in the log console?

@Jayce2177
Copy link
Author

@langsmith it won't generate a signed apk file. All I am doing is trying to track the users location, it is so simple with Google maps but I like the way mapbox looks, but I can't seem to get it to generate a signed apk. If I manually install it on my device via run:run app it works, it is when I try to generate the signed apk so I can upload the new file to the playstore that it gets hung up.

@Jayce2177
Copy link
Author

Well I have to say not pleased, after messing with this for almost a full week with something as simple as showing a map and a users location it doesn't seem to work and I have had to result back to the simple method of Google Maps, maybe in a year when Mapbox is more stable and has updated it's information I will try again. You can go ahead and mark this as closed I guess.

@langsmith
Copy link
Contributor

As @LukasPaczos stated at mapbox/mapbox-gl-native#11400 (comment), this is a proguard issue with the location layer plugin. cc @cammace

This is becoming so frustrating as there is very limited documentation or tutorials and the example apps don't even work without crashing or being able to generate a signed apk.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants