DHLopez
DHLopez

Reputation: 395

React Native: Cannot find android/app folder

I am following the tutorial to sign an apk for a native react app:

https://facebook.github.io/react-native/docs/signed-apk-android.html

But I can't locate the android/app where I am supposed to edit some files.

I tried using this path: ~project\node_modules\react-native\ReactAndroid I can see the files mentioned from the previous step, but then I run:

gradlew assembleRelease

And I get:

startup failed: build file '~project\node_modules\react-native\ReactAndroid\build.gradle': 8: unable to resolve class de.undercouch.gradle.tasks.download.Download @ line 8, column 1. import de.undercouch.gradle.tasks.download.Download

So my guess is, I am at the wrong path, could you point me to where is the android/app folder I'm looking for?

Upvotes: 2

Views: 3755

Answers (2)

hawkup
hawkup

Reputation: 547

Because create-react-native-app help to build app without configuration (no ios and android folder).

If you want to config more. run npm run eject or yarn eject in your project. After run that command folder ios and android will show up. But it will change your project structure.

Another way, you can build signed apk with expo (It's not change your project structure)

Upvotes: 2

Vishu Bhardwaj
Vishu Bhardwaj

Reputation: 366

did you run

cd android

command before running

gradlew assembleRelease

or you can run them in 1 command like

cd android && ./gradlew assembleRelease

Upvotes: 0

Related Questions