28 August, 2020

Keystore file does not exist

The following steps are required to solve this problem.

Error: keytool error: java.lang.Exception: Keystore file does not exist: path-to-debug-or-production-keystore


  • open command-line tool - WINDOW+R
  • go to C:\Program Files\Java\jdk1.8.0_261 (or your java version)


And run below command

keytool -exportcert -alias androiddebugkey -keystore C:\Users\{your.username}\.android\debug.keystore -list -v


Note* to use C:\Users\{your.username}\.android\debug.keystore instead of ~/.android\debug.keystore. I still got the error when type this shorten way.


cmd

24 August, 2020

Android project not found. Are you sure this is a React Native project

 

Issue: Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location. Run CLI with --verbose flag for more details.


Solution:

 React Native Project Root Directory 

 android -> app -> build -> intermediates -> signing_config -> debug -> out -> signing-config.json .

and delete the "signing-config.json" for ever

now this problem is solved and you can try to run your command react-native run-android



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">