相关疑难解决方法(0)

版本冲突更新到8.4.0

错误:

任务':app:processDebugGoogleServices'的执行失败.请通过更新google-services插件的版本(此处提供有关最新版本的信息)或将com.google.android.gms的版本更新为8.3.0来修复版本冲突 .

我已经完成了我发现的所有事情.

  dependencies {
            // This does not break the build when Android Studio is missing the JRebel for Android plugin.
            classpath 'com.zeroturnaround.jrebel.android:jr-android-gradle:1.0.+'
            classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
            classpath 'com.google.gms:google-services:2.0.0-alpha3'

            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
Run Code Online (Sandbox Code Playgroud)

并在应用程序gradle中

    compile 'com.google.android.gms:play-services:8.4.0'
Run Code Online (Sandbox Code Playgroud)

android google-play-services

197
推荐指数
5
解决办法
9万
查看次数

错误12501使用Google登录进行身份验证

我正在使用谷歌登录服务来验证使用我的应用程序的用户.当我刚要求电子邮件信息时,我得到了它的工作

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                    .requestEmail().build();
Run Code Online (Sandbox Code Playgroud)

然后,我发现我还需要请求ID令牌才能使用我的后端进行身份验证,所以我做了:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                    .requestIdToken(String.valueOf(R.string.server_client_id))
                    .requestEmail().build();
Run Code Online (Sandbox Code Playgroud)

问题是它不会让我在更改后登录.我每次尝试登录时都会得到的状态是Status{statusCode=unknown status code: 12501, resolution=null}.

我一直在寻找,我发现这篇文章几乎是一回事.但是,我没有回答任何人所提出的任何错误,我的开发控制台中的oAuth客户端ID用于Web应用程序: 的ClientID 并且R.string.server_client_id是图片中的第一个客户端ID.包名称当然是正确的,否则它甚至在没有令牌请求的情况下也无法工作.2人还建议应用程序需要签名才能使用,但googles文档说调试密钥也应该工作,并且让人们签署应用程序进行调试没有意义.

我一直在试图解决这个问题几个小时但没有成功.可能是什么问题呢?请随时索取我可能忘记放在这里的更多信息.

android google-play-services google-signin google-identity

48
推荐指数
3
解决办法
4万
查看次数

使用Google登录时SignInConfiguration的ClassNotFoundException

我正在实施Google登录应用.登录本身似乎工作正常,但是当我请求用户的电子邮件或ID令牌时,我在日志中看到以下堆栈跟踪,并且状态来自GoogleSignInResultasStatus{statusCode=unknown status code: 12500, resolution=null}

03-30 13:59:09.821 3634-4322/? E/Parcel: Class not found when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
                                         java.lang.ClassNotFoundException: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
                                             at java.lang.Class.classForName(Native Method)
                                             at java.lang.Class.forName(Class.java:309)
                                             at java.lang.Class.forName(Class.java:273)
                                             at android.os.Parcel.readParcelableCreator(Parcel.java:2281)
                                             at android.os.Parcel.readParcelable(Parcel.java:2245)
                                             at android.os.Parcel.readValue(Parcel.java:2152)
                                             at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
                                             at android.os.BaseBundle.unparcel(BaseBundle.java:221)
                                             at android.os.BaseBundle.getString(BaseBundle.java:918)
                                             at android.content.Intent.getStringExtra(Intent.java:5767)
                                             at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2365)
                                             at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1848)
                                             at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:5809)
                                             at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5593)
                                             at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
                                             at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3786)
                                             at android.os.Binder.execTransact(Binder.java:461)
                                          Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.auth.api.signin.internal.SignInConfiguration" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
                                             at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                             at java.lang.Class.classForName(Native Method) 
                                             at java.lang.Class.forName(Class.java:309) 
                                             at java.lang.Class.forName(Class.java:273) …
Run Code Online (Sandbox Code Playgroud)

android google-play-services

14
推荐指数
2
解决办法
1万
查看次数

Google登录无法正常工作

我正在关注Google的 Google Sign 文档.我打电话时有一个奇怪的问题

Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent (mGoogleApiClient);
        startActivityForResult (signInIntent, RC_SIGN_IN);
Run Code Online (Sandbox Code Playgroud)

似乎Intent已被解雇,但我看不到帐号选择器对话框.我在用

compile "com.google.android.gms:play-services-auth:9.6.1"

当我检查googleclient对象是否连接时,它返回true.

它在一些设备中工作,但不是在每个设备上(特别是xiaomi)

履行

@OnClick (R.id.google_singin_button)
void signInButtonClicked () {

    HashMap<String, Object> map = new HashMap<> ();
    map.put (AllAnalytics.LABEL, AllAnalytics.Label.SIGN_IN_GOOGLE);
    map.put (AllAnalytics.ACTION, AllAnalytics.Action.CLICK);
    map.put (AllAnalytics.CATEGORY, AllAnalytics.Category.REGISTRATION_SCREEN);

    aa.analyticsEventOccur (map);

    if (null != mGoogleApiClient) {
       // Log.e(TAG,mGoogleApiClient.isConnected()+"");
        Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent (mGoogleApiClient);
        startActivityForResult (signInIntent, RC_SIGN_IN);
    }
}

@Override
public void onActivityResult (int requestCode, int resultCode, Intent data) {
    super.onActivityResult (requestCode, resultCode, data);

    // Result …
Run Code Online (Sandbox Code Playgroud)

android android-intent google-signin

10
推荐指数
1
解决办法
3573
查看次数

Google登录始终在GoogleSignInResult上失败

我需要你的帮助......我不知道了!

我不明白为什么每次都失败了.

  • 我生成了ID客户端OAuth 2.0.
  • 我已生成并移动google-services.json./app文件夹中.
  • 通过Google Cloud Console,所有Google API都已激活.

退房,如果有什么伤害你......继续!

亲切的问候

build.gradle:

apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "sign.in.gogoleplusconnect"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-identity:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'
}
Run Code Online (Sandbox Code Playgroud)

activity_main.xml中

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
    android:id="@+id/title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android google-api google-plus google-play-services

7
推荐指数
1
解决办法
7073
查看次数

Google使用React Native中的Firebase登录

我正在尝试使用Google登录但它却抛出了这个错误:

代码:"auth/operation-not-supported-in-this-environment"消息:"此应用程序运行的环境不支持此操作."location.protocol"必须是http,https或chrome-extension和web必须启用存储."

这是代码:

const provider = new firebase.auth.GoogleAuthProvider();
provider.addScope('profile');
provider.addScope('email');
firebase.auth().signInWithPopup(provider)
  .then((result) => {
    console.log(result);
  })
  .catch((error) => {
    console.log(error);
  })
Run Code Online (Sandbox Code Playgroud)

附加信息:

  • "firebase":"^ 3.7.1"
  • "react-native":"^ 0.42.0"
  • 平台:Android

有任何想法吗?提前致谢!

firebase react-native firebase-authentication

6
推荐指数
1
解决办法
8383
查看次数

状态码12501使用Google登录进行身份验证

我正在使用以下代码行进行G +登录android集成.

在app build.gradle中:

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

在MainActivity中:

 GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                    .requestEmail()
                    .requestIdToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com")
                    .requestProfile()
                    .build();

            AppCompatActivity appCompatActivity = (AppCompatActivity) context;

            googleApiClient = new GoogleApiClient.Builder(context)
                    .enableAutoManage(appCompatActivity, this)
                    .addConnectionCallbacks(this)
                    .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                    .addApi(Plus.API)
                    .build();
Run Code Online (Sandbox Code Playgroud)

我还在应用级别添加了"google-services.gson"文件.我还制作了web应用程序,并使用clientIid来获取requestIdToken()参数.

requestIdToken(webapp的client-id).

编写完这段代码后,我仍然得到状态码= 12501作为响应,而tokenId = null.

我也看过这个链接.但找不到任何解决方案.

android social-networking google-play-services google-signin

5
推荐指数
1
解决办法
1万
查看次数