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

前端 未结 30 1211
孤街浪徒
孤街浪徒 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: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.

提交回复
热议问题