android – Facebook登录按钮小部件没有资源标识

android – Facebook登录按钮小部件没有资源标识,第1张

概述我继承了一些代码并且我正在研究它,但是,当我尝试构建它时,我得到以下问题: activity_login.xml:26: error: No resource identifier found for attribute 'login_text' in package 我的按钮xml如下: <com.facebook.widget.LoginButton xmlns:fb="htt 我继承了一些代码并且我正在研究它,但是,当我尝试构建它时,我得到以下问题:
activity_login.xml:26: error: No resource IDentifIEr found for attribute 'login_text' in package

我的按钮xml如下:

<com.facebook.Widget.Loginbutton        xmlns:fb="http://schemas.androID.com/apk/res-auto"        androID:ID="@+ID/facebookBtn"        androID:layout_wIDth="match_parent"        androID:layout_height="wrap_content"        androID:layout_margintop="25dp"        androID:textcolor="@color/white"        androID:textAppearance="@androID:style/TextAppearance.Small"        androID:gravity="center"        androID:onClick="facebookBtnClick"        androID:paddingleft="30dp"        fb:login_text="@string/loginWithFacebook"        />

我也试过放入xmlns:fb =“http://schemas.androID.com/apk/res/com.facebook.Widget”
但这对我来说也不起作用,如果有人有任何建议我会非常感激

解决方法 你可以在这里找到信息 https://developers.facebook.com/docs/android/upgrading-4.x

Style attr Tags are Now namespaced to avoID conflicts. Apps will need
to add the namespace “com_facebook_” to their existing facebook sdk
style attrs.

所以,现在使用fb:com_facebook_login_text.

总结

以上是内存溢出为你收集整理的android – Facebook登录按钮小部件没有资源标识全部内容,希望文章能够帮你解决android – Facebook登录按钮小部件没有资源标识所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1138061.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存