Coder Social home page Coder Social logo

Comments (9)

github-actions avatar github-actions commented on May 1, 2024
⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.72.12. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

from react-native.

cortinico avatar cortinico commented on May 1, 2024

Thanks for the reproducer @19abhishek

There are 2 problems in your project:

  1. This line
    https://github.com/19abhishek/react-native-hello-world/blob/faae4b860b93e7cf39a9e9f231db155268488c86/android/app/build.gradle#L1

It should be changed as follows:

-apply plugin: "com.android.application"
+apply plugin: "com.android.library"

That's because you're specifying an Android App there and not a library.

  1. You're including the same Gradle module twice here:

https://github.com/19abhishek/react-native-hello-world/blob/faae4b860b93e7cf39a9e9f231db155268488c86/android/settings.gradle#L3-L5

As you're including the :app module (with path ./app), and then you're creating another module called :rnsdk with path ./app. So this can't work.
You would have to change the settings.gradle file as follows:

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
-include ':rnsdk'
-project(':rnsdk').projectDir = new File(rootProject.projectDir, './app')
includeBuild('../node_modules/@react-native/gradle-plugin')

from react-native.

19abhishek avatar 19abhishek commented on May 1, 2024

I made the changes but I'm still getting the same issue @cortinico. I have updated the reproducer file as well with those changes.

Getting the below error on running ./gradlew assembleRelease (in android folder)-

Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.

Could not find com.facebook.react:react-android:.
Required by:
project :app

from react-native.

cortinico avatar cortinico commented on May 1, 2024

Sorry I used the wrong symbols on my first suggestion:

You should update the android/app/build.gradle as follows:

+apply plugin: "com.android.application"
-apply plugin: "com.android.library"

from react-native.

19abhishek avatar 19abhishek commented on May 1, 2024

That'll generate a releaseAPK, I wanted to create a .aar file (SDK for android). What changes do I need to make for that? @cortinico

from react-native.

cortinico avatar cortinico commented on May 1, 2024

That'll generate a releaseAPK, I wanted to create a .aar file (SDK for android). What changes do I need to make for that? @cortinico

You should be using a template like this one:
https://callstack.github.io/react-native-builder-bob/create

from react-native.

19abhishek avatar 19abhishek commented on May 1, 2024

That'll generate a releaseAPK, I wanted to create a .aar file (SDK for android). What changes do I need to make for that? @cortinico

You should be using a template like this one: https://callstack.github.io/react-native-builder-bob/create

Thanks for the reply. Actually I wanted to create a library of an existing React native app which is on 0.72.0 version, was getting the same error there, so was trying it on a Hello world project but faced the same issue there. How can I create a library for this starter hello world project, can you help with that?

from react-native.

cortinico avatar cortinico commented on May 1, 2024

How can I create a library for this starter hello world project, can you help with that?

Nope sorry I cannot help you further. Please seek support on StackOverflow or use the template project I linked you

from react-native.

19abhishek avatar 19abhishek commented on May 1, 2024

How can I create a library for this starter hello world project, can you help with that?

Nope sorry I cannot help you further. Please seek support on StackOverflow or use the template project I linked you

Okay, thanks.

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.