我正在使用Youtube API创建应用程序。它工作正常,但在我使用this method更改包名后,我得到了以下异常。
com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException
如果我使用相同的方法将包名更改回原始版,则API开始正常工作。
我已将applicationId
更改为新的软件包名称,重新启动Android Studio,清理项目,重建项目但没有任何更改。
Stack Track:
11-09 01:49:38.903 10201-10610/com.example.nishant.veuz W/System.err: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException
11-09 01:49:38.903 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:299)
11-09 01:49:38.903 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
11-09 01:49:38.903 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
11-09 01:49:38.903 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.example.nishant.veuz.youTubeOperations.YouTubeChannelVideo$2.doInBackground(YouTubeChannelVideo.java:92)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.example.nishant.veuz.youTubeOperations.YouTubeChannelVideo$2.doInBackground(YouTubeChannelVideo.java:88)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at java.lang.Thread.run(Thread.java:818)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: Caused by: com.google.android.gms.auth.GoogleAuthException: UNREGISTERED_ON_API_CONSOLE
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.zze.zzy(Unknown Source)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.zzd.zza(Unknown Source)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.zzd.zzb(Unknown Source)
11-09 01:49:38.904 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.zzd.getToken(Unknown Source)
11-09 01:49:38.905 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.zzd.getToken(Unknown Source)
11-09 01:49:38.905 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.zzd.getToken(Unknown Source)
11-09 01:49:38.905 10201-10610/com.example.nishant.veuz W/System.err: at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
11-09 01:49:38.905 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:267)
11-09 01:49:38.905 10201-10610/com.example.nishant.veuz W/System.err: at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:292)
11-09 01:49:38.905 10201-10610/com.example.nishant.veuz W/System.err: ... 12 more