android / codelab-android-performance

Apache License 2.0
21 stars 10 forks source link

Permission: android.permission.READ_EXTERNAL_STORAGE cannot be granted! #13

Closed JyotimoyKashyap closed 10 months ago

JyotimoyKashyap commented 1 year ago

While trying to run the project after adding the benchmark module and making all the necessary changes as per the codelab. The test fails with an error messag in logcat

Requesting permission: pm grant com.example.macrobenchmark android.permission.READ_EXTERNAL_STORAGE
UiAutomation.grantRuntimePermission() is more robust and should be used instead of 'pm grant'
Permission: android.permission.READ_EXTERNAL_STORAGE cannot be granted!
failed: startup(com.example.macrobenchmark.ExampleStartupBenchmark)

I tried to go through Google codelab in hopes of setting up a multi-module project in which I was to setup benchmarking for some of the core functionality like signal processing and multi-threading.

Android Studio Version: Latest (Android Studio Flamingo) Android Version of my physical device : Android 11

Sachin-Radhakrishnan commented 10 months ago

@JyotimoyKashyap I am also facing similar error. Did you get a solution for this issue?

keyboardsurfer commented 10 months ago

I can not reproduce this with a Pixel 6 or newer device with benchmarking 1.2.0