Android 11 YouTubeAndroidPlayerApi not working

1.5k Views Asked by At

I using YouTubeAndroidPlayerApi for Playing YouTube videos it was working good before Android 11 but when i installed System update to Android 11 it's stop working. I'm using OnePlus 8 device i also tested this code in Pixel 2 XL emulator but same error occur. Same code working on or before Android 10.

YouTubeAndroidPlayerApi version : YouTubeAndroidPlayerApi-1.2.2.zip

Error is : enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

As mentioned here, it's because of package visibility on Android 11. you need to add a proper "query" tag to your AndroidMonifest.