okta / samples-android

samples-android
https://github.com/okta/samples-android
Apache License 2.0
37 stars 52 forks source link

adding okta to existing project not working #65

Closed yahmi closed 2 years ago

yahmi commented 3 years ago

Hi , I followed all step to add okta to an existing android project , when sync gradle is goin ok , but when build the app it show this message **

In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.2.4

JayNewstrom commented 3 years ago

Hi, thanks for the issue.

What library are you trying to include?

Can you reproduce this in one of our sample apps?

yahmi commented 3 years ago

i am trying to include this library : implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.okta.android:oidc-androidx:1.0.16' implementation 'com.okta.authn.sdk:okta-authn-sdk-api:2.0.0' implementation('com.okta.authn.sdk:okta-authn-sdk-impl:2.0.0') { exclude group: 'com.okta.sdk', module: 'okta-sdk-httpclient' }

    implementation 'com.okta.sdk:okta-sdk-okhttp:2.0.0'

and also added this proguard-rules.pro

-keep class com.okta.* { ; }

so for this google play service i downgrad from 4.2 to 4.1 it works but error message is displaying this : java.lang.reflect.InvocationTargetException (no error message)

yahmi commented 3 years ago

@JayNewstrom even when i try your exemple steps i get this kind of error Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: androidx.startup.StartupException: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com. it make other library not working well

Before without adding okta dépendencies the project compile and work fine

JayNewstrom commented 3 years ago

@yahmi your dependencies look similar to our sign-in-kotlin example. Could you try to recreate the error in our sample? https://github.com/okta/samples-android/blob/master/sign-in-kotlin/

I'm unable to reproduce your issue.

yahmi commented 3 years ago

Hello , On your own example unable to reproduce it , your libs is working with google services 4.0.0 other is not working

JayNewstrom commented 3 years ago

Hi @yahmi are you still running into this issue? Is there anything else I can help with?