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

跟風遠走 提交于 2019-12-21 10:17:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!