gpt4 book ai didi

java - 如何添加按钮 Google+ 登录?

转载 作者:行者123 更新时间:2023-11-30 01:40:32 26 4
gpt4 key购买 nike

我在SDK中安装了Google Play Services,然后在其'Layout'按钮代码中添加了Google

    <com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

有一个错误:

Rendering Problems The following classes could not be found:
- com.google.android.gms.common.SignInButton (Fix Build Path, Create Class)
Tip: Try to build the project.

我在我的构建文件中添加一行:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])


--> compile 'com.google.android.gms:play-services-ads:8.3.0'


testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/bolts-android-1.2.1.jar')
compile files('libs/Parse-1.10.3.jar')
}

但是还是不行。我怎样才能让按钮出现?

最佳答案

您添加了错误的依赖项。您应该为登录按钮添加这个。

compile 'com.google.android.gms:play-services-auth:8.4.0'

关于java - 如何添加按钮 Google+ 登录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34570091/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com