react-native 使用react-native run-android 啟動項目 報錯 Android project not found


react-native 項目意外關閉  重新啟動項目  啟動命令   react-native run-android   然后 項目報錯 

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.

找了很多辦法,比如更新react-native ,清除項目緩存,都沒有用,最后發現是Android的文件問題,刪除   項目文件中  /android/app/ 下面的bulid 文件,然后Android軟件重新編譯,命令行重新輸入啟動命令,項目啟動成功。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM