Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.android.support:customtabs: No virtual method launchUrl

java.lang.NoSuchMethodError: No virtual method launchUrl(Landroid/app/Activity;Landroid/net/Uri;)V in class Landroid/support/customtabs/CustomTabsIntent

Before everything worked, but today I can see the above error. Why it happens? if something was changed, why not backwards-compatible?

like image 462
pvllnspk Avatar asked Oct 29 '16 14:10

pvllnspk


1 Answers

Don't know if it helps you but in my case (I have Facebook SDK in my app with custom tabs enabled) this error happened when user (without installed Facebook app) tried to log in.

Exception java.lang.NoSuchMethodError: No virtual method launchUrl(Landroid/app/Activity;Landroid/net/Uri;)V in class Landroid/support/customtabs/CustomTabsIntent; or its super classes 
com.facebook.internal.CustomTab.openCustomTab (CustomTab.java:48)

Updating dependency to use latest SDK version (they switched to customtabs:25.0.0 in version 4.17.0)

compile 'com.facebook.android:facebook-android-sdk:4.17.0'

fixed the problem.

I also use Custom Tabs (v25.0.0) in my app and have no issues with them. If it's not your case you can check what they've changed.

like image 58
mat Avatar answered Nov 11 '22 15:11

mat