jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
754 stars 275 forks source link

Bug: Emulator crashes when adding workout manually #310

Closed daverix closed 9 years ago

daverix commented 9 years ago

Steps to reproduce:

  1. Choose froyoDebug as build variant for app project in Android Studio
  2. Start emulator with API level 8.
  3. Deploy the app from Android Studio
  4. Choose the manual tab inside the Start tab
  5. Set start hour, a duration, a distance and write some words for notes
  6. Click save activity

What happens: Emulator crashes with the following error...

08-15 23:06:01.832  10598-11136/org.runnerup E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
    java.lang.RuntimeException: An error occured while executing doInBackground()
            at android.os.AsyncTask$3.done(AsyncTask.java:200)
            at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
            at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
            at java.util.concurrent.FutureTask.run(FutureTask.java:137)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
            at java.lang.Thread.run(Thread.java:1096)
     Caused by: java.lang.NoClassDefFoundError: java.util.ArrayDeque
            at com.squareup.okhttp.Dispatcher.<init>(Dispatcher.java:44)
            at com.squareup.okhttp.OkHttpClient.<init>(OkHttpClient.java:196)
            at com.mapbox.mapboxsdk.util.NetworkUtils.getHttpURLConnection(NetworkUtils.java:37)
            at com.mapbox.mapboxsdk.util.NetworkUtils.getHttpURLConnection(NetworkUtils.java:33)
            at com.mapbox.mapboxsdk.tileprovider.tilesource.TileJsonTileLayer$RetrieveJSONTask.doInBackground(TileJsonTileLayer.java:161)
            at com.mapbox.mapboxsdk.tileprovider.tilesource.TileJsonTileLayer$RetrieveJSONTask.doInBackground(TileJsonTileLayer.java:156)
            at android.os.AsyncTask$2.call(AsyncTask.java:185)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
            at java.util.concurrent.FutureTask.run(FutureTask.java:137)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
            at java.lang.Thread.run(Thread.java:1096)

What should happen: The workout should be added without crash.

Update: It's also possible to reproduce this by going into history and open an earlier workout.

jonasoreland commented 9 years ago

can you maybe also fix this ?? I can't get the emulator started in version 8... or can someone else

I really want to make a release, but hate regressions. (after release I want to merge e.g fragment stuff)

nebmo commented 9 years ago

Does mapbox work in emulator? (i have no idea)

bagage commented 9 years ago

Yes it should, I am almost sure to have tested integration with it. On Froyo build it should not be compiled at all so it should not be the problem.

jonasoreland commented 9 years ago

hmm...i think i'll install android studio on family (windows) computer and see if i can get emulator to work there...

daverix commented 9 years ago

in build.gradle latestCompile isn't used, so it's indeed used on froyo builds as well

jonasoreland commented 9 years ago

do you mean diff --git a/app/build.gradle b/app/build.gradle index 8c2da48..857a22d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -74,7 +74,7 @@ dependencies {

 froyoCompile 'com.android.support:support-v4:19.1.+'

?? if yes, can you test ? (since you have a functional froyo emulator)

/Jonas

On Sun, Aug 23, 2015 at 8:37 PM, David Laurell notifications@github.com wrote:

in build.gradle latestCompile isn't used, so it's indeed used on froyo builds as well

— Reply to this email directly or view it on GitHub https://github.com/jonasoreland/runnerup/issues/310#issuecomment-133896343 .

daverix commented 9 years ago

Yes, I'm testing to use latestCompile and move resources to layout-v14 etc right now :)

daverix commented 9 years ago

Check #312, I have a fix for this! :)