Search code examples
androidangularcapacitor

Capacitor / CMOTION/ionic-keycloak-auth CustomTabsIntent not found


i trying to convert our angular webapp to an android app with capacitor. We are using SSO Login and i wanted to use the https://www.npmjs.com/package/@cmotion/ionic-keycloak-auth everything is installed and configurated but on build i get this error

import android.support.customtabs.CustomTabsIntent;
                             ^
symbol:   class CustomTabsIntent
location: package android.support.customtabs

in the BrowserTab class.

i have added the android support and browsertab to the depencies

dependencies {
implementation fileTree(dir: 'src/main/libs', include: ['*.jar'])
implementation "org.apache.cordova:framework:$cordovaAndroidVersion"
// SUB-PROJECT DEPENDENCIES START
implementation 'com.android.support:customtabs:28.0.0'
// SUB-PROJECT DEPENDENCIES END

}

i have invalidated the cache of android studio but everytime this problem.


Solution

  • the import was wrong if u have the problem change the import of customtabs to

    import androidx.browser.customtabs.CustomTabsIntent