FirebaseAnalytics.getInstance shows a warning but compiles successfully

When I write code about firebase analysis, for example FirebaseAnalytics.getInstance() , I get a warning message:

Missing permissions required by FirebaseAnalytics.getInstance: android.permission.ACCESS_NETWORK_STATE and android.permission.WAKE_LOCK

Here is a screenshot:

enter image description here

I did not find anything about this in googling.

I also tried to clean and restore my project. Restarting Android Studio. Nothing succeeded.

What is the problem?

Edit: There are permissions. I see them in a united manifest. But still gives an error.

enter image description here

+6
source share
1 answer

Add <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> and <uses-permission android:name="android.permission. WAKE_LOCK" /> to the manifest file

+5
source

Source: https://habr.com/ru/post/1012143/


All Articles