React native: Android project not found. Maybe run react-native android first?

前端 未结 30 1176
孤街浪徒
孤街浪徒 2020-12-12 16:43

I had an issue in my React-Native project which was working fine earlier but suddenly it stopped working. Whenever I used the command:

react-native run-andro         


        
相关标签:
30条回答
  • 2020-12-12 17:39

    Delete signing-config.json next try again react-native run-android

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

    0 讨论(0)
  • 2020-12-12 17:41

    As a complement, in the case react-native command is not found, you should install react-native CLI:

    npm install -g react-native-cli
    

    Then you can follow the steps people said above.

    More details: react-native: command not found

    0 讨论(0)
  • 2020-12-12 17:44

    Open Command Prompt as Administrator and goto the project folder, run android(npx react-native run-android)

    0 讨论(0)
  • 2020-12-12 17:44

    May be it's too late, I replaced the Android folder from a backup file. It worked for me.

    0 讨论(0)
  • 2020-12-12 17:44

    I solved the issue by killing all instances of java.exe with: taskkill /f /im java.exe.

    0 讨论(0)
  • 2020-12-12 17:45

    We had this issue because files from android folder gradlew and gradlew.bat (Gradle startup script for the UN*X, Windows respectively) somehow got into the global .gitignore file, and so were not presented on local environments.

    Actually running react-native upgrade command restore those files, thus fixing the problem.

    0 讨论(0)
提交回复
热议问题