Git Product home page Git Product logo

Comments (2)

cortinico avatar cortinico commented on May 1, 2024

The problem you're having @Hao-yiwen is because you have the Android files in a separate folder structure from your node_modules folder (so Gradle won't find the react-native/cli file and fail your build).

You need to refactor your project as follows:

rnIntegation
├── README.md
└── rnDemo
    ├── android
    │   ├── app
    │   │   ├── build.gradle
    │   │   ├── proguard-rules.pro
    │   │   └── src
    │   │       ├── androidTest
    │   │       │   └── java
    │   │       │       └── com
    │   │       │           └── example
    │   │       │               └── android_container
    │   │       │                   └── ExampleInstrumentedTest.java
    │   │       ├── main
    │   │       │   ├── AndroidManifest.xml
    │   │       │   ├── java
    │   │       │   │   └── com
    │   │       │   │       └── example
    │   │       │   │           └── android_container
    │   │       │   │               ├── MainActivity.java
    │   │       │   │               └── MyReactActivity.java
    │   │       │   └── res
    │   │       │       ├── drawable
    │   │       │       │   ├── ic_launcher_background.xml
    │   │       │       │   └── ic_launcher_foreground.xml
    │   │       │       ├── layout
    │   │       │       │   ├── activity_main.xml
    │   │       │       │   └── activity_my_react.xml
    │   │       │       ├── mipmap-anydpi-v26
    │   │       │       │   ├── ic_launcher.xml
    │   │       │       │   └── ic_launcher_round.xml
    │   │       │       ├── mipmap-hdpi
    │   │       │       │   ├── ic_launcher.webp
    │   │       │       │   └── ic_launcher_round.webp
    │   │       │       ├── mipmap-mdpi
    │   │       │       │   ├── ic_launcher.webp
    │   │       │       │   └── ic_launcher_round.webp
    │   │       │       ├── mipmap-xhdpi
    │   │       │       │   ├── ic_launcher.webp
    │   │       │       │   └── ic_launcher_round.webp
    │   │       │       ├── mipmap-xxhdpi
    │   │       │       │   ├── ic_launcher.webp
    │   │       │       │   └── ic_launcher_round.webp
    │   │       │       ├── mipmap-xxxhdpi
    │   │       │       │   ├── ic_launcher.webp
    │   │       │       │   └── ic_launcher_round.webp
    │   │       │       ├── values
    │   │       │       │   ├── colors.xml
    │   │       │       │   ├── strings.xml
    │   │       │       │   └── themes.xml
    │   │       │       ├── values-night
    │   │       │       │   └── themes.xml
    │   │       │       └── xml
    │   │       │           ├── backup_rules.xml
    │   │       │           └── data_extraction_rules.xml
    │   │       └── test
    │   │           └── java
    │   │               └── com
    │   │                   └── example
    │   │                       └── android_container
    │   │                           └── ExampleUnitTest.java
    │   ├── build.gradle
    │   ├── gradle
    │   │   ├── libs.versions.toml
    │   │   └── wrapper
    │   │       ├── gradle-wrapper.jar
    │   │       └── gradle-wrapper.properties
    │   ├── gradle.properties
    │   ├── gradlew
    │   ├── gradlew.bat
    │   └── settings.gradle
    ├── index.js
    ├── metro.config.js
    ├── package.json
    └── yarn.lock

I've attached a refactor of the project so it builds correctly.

rnIntegation.zip

from react-native.

Hao-yiwen avatar Hao-yiwen commented on May 1, 2024

Thanks very much.

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.