Code Monkey home page Code Monkey logo

Comments (7)

ianlin avatar ianlin commented on June 30, 2024 1

In your app level's build.gradle there should be this line:

compile project(':react-native-firebase-crash-report')

Normally it's added automatically via rnpm link, did you successfully run rnpm link?

from react-native-firebase-crash-report.

ddobby94 avatar ddobby94 commented on June 30, 2024

UPDATE: swithced to rn: 0.41.0, but I am still getting the same error, just as above.

from react-native-firebase-crash-report.

ianlin avatar ianlin commented on June 30, 2024

Hey @ddobby94, can you show your settings.gradle? There should be these two lines:

include ':react-native-firebase-crash-report'
project(':react-native-firebase-crash-report').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-crash-report/android')

from react-native-firebase-crash-report.

ddobby94 avatar ddobby94 commented on June 30, 2024

thanks for the quick reply, @ianlin
Here is my settings.gradle:

...
include ':react-native-firebase-crash-report'
project(':react-native-firebase-crash-report').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-crash-report/android')
...

from react-native-firebase-crash-report.

ianlin avatar ianlin commented on June 30, 2024

It looks right. Also can you please show your android/build.gradle and android/app/build.gradle? Cheers.

from react-native-firebase-crash-report.

ddobby94 avatar ddobby94 commented on June 30, 2024

app lvl:

dependencies {
    ...
    compile "com.google.firebase:firebase-messaging:10.0.0"
    compile "com.google.android.gms:play-services-location:10.0.0"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

apply plugin: 'com.google.gms.google-services'

root lvl:

dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

from react-native-firebase-crash-report.

ddobby94 avatar ddobby94 commented on June 30, 2024

@ianlin Yes! That's it! The build is now good!

And answering your question: I have runned the rnpm link, but it only put
import com.ianlin.RNFirebaseCrashReport.RNFirebaseCrashReportPackage;
inside MainActivity.java,

but the compile project(':react-native-firebase-crash-report')
was missing from app/build.gradle.

I think you could add this line to the android installation too:

  • In android/setting.gradle
include ':react-native-firebase-crash-report'
project(':react-native-firebase-crash-report').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-crash-report/android')

Thanks for the help!

from react-native-firebase-crash-report.

Related Issues (15)

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.