Skip to content
This repository was archived by the owner on Jul 30, 2022. It is now read-only.
This repository was archived by the owner on Jul 30, 2022. It is now read-only.

You updated to targetSdkVersion 23 but forgot to request for permissions #13

@nordfalk

Description

@nordfalk

On an Android 6 device the app crashes with
11-28 12:53:26.067 3126-3126/dk.nordfalk.vuc_yttest E/AndroidRuntime: FATAL EXCEPTION: main
Process: dk.nordfalk.vuc_yttest, PID: 3126
java.lang.SecurityException: Missing android.permission.GET_ACCOUNTS
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at com.google.android.gms.plus.internal.zzd$zza$zza.getAccountName(Unknown Source)
at com.google.android.gms.plus.internal.zze.getAccountName(Unknown Source)
at com.google.android.gms.internal.zzpn.getAccountName(Unknown Source)
at com.google.ytdl.UploadsListFragment.onConnected(UploadsListFragment.java:147)

This is because you need to request the permission at runtime.

Fix:

  1. set your targetSdkVersion to 22 in your build.gradle, or
  2. follow the steps described in https://developer.android.com/training/permissions/requesting.html

Read more here: http://stackoverflow.com/questions/33023674/android-6-getaccountname-missing-android-permission-get-accounts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions