简体   繁体   中英

react-native run-android issue - error Android project not found

I create a react native app in C9. Now, I want to develop this app on my local machine with android settings. I downloaded the project.

cd myProjectFolder
react-native start
npm install
react-native run-android

Also, I add a project name in package.json.

The error is below:

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

如果 android 项目/文件夹未在您的根项目中退出,则运行:

react-native eject

I encountered this issue after I ruan ./gradlew clean . Tried serval methods but vain. Then I ran ./gradlew in the Android directory. It worked for me.

// Android
./gradlew

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM