05 August, 2020

React Native Android Issue: open failed: EACCES (Permission )

Error: /storage/emulated/0/Download/testvideo.mp4: open failed: EACCES (Permission )


How to Fix it?
 You need to do a couple of things to fix this issue

Goto to  android\app\src\main\AndroidManifest.xml file add following highlighted settings

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.awesomeproject">

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


Google has a new feature on Android Q: the filtered view for external storage. A quick fix for that is to add this code in the AndroidManifest.xml file:

<application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:requestLegacyExternalStorage="true"
      android:theme="@style/AppTheme">

No comments:

Post a Comment

Microservices vs Monolithic Architecture

 Microservices vs Monolithic Architecture Here’s a clear side-by-side comparison between Microservices and Monolithic architectures — fro...