Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android App crashes #17

Closed
Abgaryan opened this issue May 23, 2018 · 5 comments
Closed

Android App crashes #17

Abgaryan opened this issue May 23, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Abgaryan
Copy link
Contributor

E/AndroidRuntime( 9484): java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode E/AndroidRuntime( 9484): at android.support.v4.app.BaseFragmentActivityApi14.checkForValidRequestCode(BaseFragmentActivityApi14.java:79) E/AndroidRuntime( 9484): at android.support.v4.app.FragmentActivity.validateRequestPermissionsRequestCode(FragmentActivity.java:765) E/AndroidRuntime( 9484): at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:505) E/AndroidRuntime( 9484): at io.intheloup.geolocation.location.LocationClient.requestPermission(LocationClient.kt:288) E/AndroidRuntime( 9484): at io.intheloup.geolocation.location.LocationClient.validateServiceStatus(LocationClient.kt:245) E/AndroidRuntime( 9484): at io.intheloup.geolocation.location.LocationClient.requestLocationPermission(LocationClient.kt:71) E/AndroidRuntime( 9484): at io.intheloup.geolocation.LocationChannel$requestLocationPermission$1.doResume(LocationChannel.kt:31) E/AndroidRuntime( 9484): at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:54) E/AndroidRuntime( 9484): at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:161) E/AndroidRuntime( 9484): at kotlinx.coroutines.experimental.DispatchedContinuation.run(Dispatched.kt:25) E/AndroidRuntime( 9484): at android.os.Handler.handleCallback(Handler.java:739) E/AndroidRuntime( 9484): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 9484): at android.os.Looper.loop(Looper.java:158) E/AndroidRuntime( 9484): at android.app.ActivityThread.main(ActivityThread.java:7229) E/AndroidRuntime( 9484): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 9484): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) E/AndroidRuntime( 9484): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@lukaspili
Copy link
Contributor

Thanks for the report, will fix asap.
Context: The request id for permission request is too big 138978923. Valid maximum seems to be 65536 on some devices.

@lukaspili lukaspili added the bug Something isn't working label May 23, 2018
@lukaspili lukaspili self-assigned this May 23, 2018
@Abgaryan
Copy link
Contributor Author

@lukaspili you an close the issue solved in #18

@asoseil
Copy link

asoseil commented Jun 3, 2018

@lukaspili Hi, my app crash if i use geolocation with firebase. Separately works fine, i tried with a blank app and when i add firebase with geolocation crash during the building phase. Could be a dependencies problem? I'm using latest master version of flutter, firebase and geolocation.

In my app/build.gradle i'm using (without there is a exceed dex erroe)

configurations.all {
    resolutionStrategy {
        eachDependency { details ->
            if (details.requested.group == 'com.google.android.gms' ||
                    details.requested.group == 'com.google.firebase') {
                details.useVersion "11.8.0"
            }
        }
    }
}

and this is my error stack


I/art     ( 6253): Background partial concurrent mark sweep GC freed 4365(417KB) AllocSpace objects, 3(60KB) LOS objects, 24% free, 8MB/11MB, paused 31.096ms total 180.579ms
W/art     ( 6253): Verification of bjzf owi.a(android.content.Context, boolean, java.lang.String, int, java.lang.Integer, oxk, bbvj) took 142.998ms
W/linker  ( 6253): /data/app/com.google.android.gms-1/lib/arm/libconscrypt_gmscore_jni.so: unused DT entry: type 0xf arg 0x193
V/NativeCrypto( 6253): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 280 native methods...
I/art     ( 6253): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java7ExtendedSSLSession>
I/art     ( 6253): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java7ExtendedSSLSession>
I/art     ( 6253): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java8ExtendedSSLSession>
I/art     ( 6253): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java8ExtendedSSLSession>
I/ProviderInstaller( 6253): Installed default security provider GmsCore_OpenSSL
D/AndroidRuntime( 6253): Shutting down VM
E/AndroidRuntime( 6253): FATAL EXCEPTION: main

@renecura
Copy link

renecura commented Jul 4, 2018

Same problem here with firebase (cloud_firestore).
Only adding the dependencies in pubspec.yaml breaks the app.

dependencies:
  cloud_firestore: ^0.7.3
  geolocation: ^0.2.1
  flutter:
    sdk: flutter

EDITED:

This fixed the problem for me (As commented in #10 (comment)):

add at the end of the file app\build.gradle

configurations.all {
    resolutionStrategy {
        force 'com.google.android.gms:play-services-location:15.0.0'
    }
}

@lukaspili
Copy link
Contributor

Sorry for the delay. It's fixed in the latest release 1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants