问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/40319860/com-android-supportcustomtabs-no-virtual-method-launchurl