как решить "Ошибка получения токена: AUTHENTICATION_FAILED"? - PullRequest
1 голос
/ 15 мая 2019

Я реализовал всю документацию, но все еще получаю эту ошибку.

This is my log:
W/FirebaseMessagingPlugin(29848): getToken, error fetching instanceID: 
W/FirebaseMessagingPlugin(29848): java.io.IOException: AUTHENTICATION_FAILED
W/FirebaseMessagingPlugin(29848):   at com.google.firebase.iid.zzs.zza(Unknown Source:71)
W/FirebaseMessagingPlugin(29848):   at com.google.firebase.iid.zzs.zza(Unknown Source:84)
W/FirebaseMessagingPlugin(29848):   at com.google.firebase.iid.zzt.then(Unknown Source:4)
W/FirebaseMessagingPlugin(29848):   at com.google.android.gms.tasks.zzd.run(Unknown Source:5)
W/FirebaseMessagingPlugin(29848):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/FirebaseMessagingPlugin(29848):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/FirebaseMessagingPlugin(29848):   at java.lang.Thread.run(Thread.java:764)

Я просмотрел множество доступных вариантов, но все еще не смог понять проблему ...

Вот проект Gradle:

dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.2.0'
    }

Это приложение Gradle:

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

применить плагин: 'com.google.gms.google-services'

Мой файл манифеста:

> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
>     package="com.xyz.com">
> 
>     <!-- The INTERNET permission is required for development. Specifically,
>          flutter needs it to communicate with the running application
>          to allow setting breakpoints, to provide hot reload, etc.
>     -->
>     <uses-permission android:name="android.permission.INTERNET"/>
>     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
>     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
>     <uses-permission android:name="android.permission.CAMERA" />
>     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
>     
> 
>     <!-- io.flutter.app.FlutterApplication is an android.app.Application that
>          calls FlutterMain.startInitialization(this); in its onCreate method.
>          In most cases you can leave this as-is, but you if you want to provide
>          additional functionality it is fine to subclass or reimplement
>          FlutterApplication and put your custom class here. -->
>     <application
>         android:name="io.flutter.app.FlutterApplication"
>         android:label="xyz"
>         android:icon="@mipmap/ic_launcher">
>         <activity
>             android:name=".MainActivity"
>             android:launchMode="singleTop"
>             android:theme="@style/LaunchTheme"
>             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
>             android:hardwareAccelerated="true"
>             android:windowSoftInputMode="adjustResize">
>             <!-- This keeps the window background of the activity showing
>                  until Flutter renders its first frame. It can be removed if
>                  there is no splash screen (such as the default splash screen
>                  defined in @style/LaunchTheme). -->
>             <meta-data
>                 android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
>                 android:value="true" />
>             
>             <intent-filter>
>                 <action android:name="android.intent.action.MAIN"/>
>                 <category android:name="android.intent.category.LAUNCHER"/>
>             </intent-filter>
>             <intent-filter>
>                 <action android:name="FLUTTER_NOTIFICATION_CLICK" />
>                 <category android:name="android.intent.category.DEFAULT" />
>             </intent-filter>
>            
>         </activity>
>         <service
>         android:name="eu.acme.service.FireBaseInstanceIdService"
>         android:exported="false" >
>         <intent-filter>
>             <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
>         </intent-filter>
>         </service>
>         <meta-data android:name="com.google.android.geo.API_KEY"
>                android:value="AIzoUeNddNTMVhPcm9c364781eRse5arovUiKi9Tejs"/>
>     </application> </manifest>

токен не генерируется ... он показывает ошибку выше каждого раза, когда я запускаю приложение. Я пытался очистить и все такое ... любая помощь ??

...