GithubHelp home page GithubHelp logo

Comments (9)

eddieowens avatar eddieowens commented on July 21, 2024

Hey @Code-Tap, this looks like a problem with your android/build.gradle file. Check to see that you have all the repositories added like so:

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
    }
}

And it should work. If not, I'd check out this thread for more help. Let me know how it goes!

from react-native-boundary.

TareqAbughosh avatar TareqAbughosh commented on July 21, 2024

Im getting that error as well!
Tried couple of solution including yours, its not working.

from react-native-boundary.

eddieowens avatar eddieowens commented on July 21, 2024

This is the android/build.gradle file that I'm using in my own project with this lib:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'

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

allprojects {
    repositories {
        // Add jitpack repository (added by react-native-spinkit)
        mavenLocal()
        google()
        maven { url "https://jitpack.io" }
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

ext {
    compileSdkVersion = 26
    minSdkVersion = 16
    targetSdkVersion = 26
    buildToolsVersion = "27.0.3"
    supportLibVersion = "27.1.0"
    googlePlayServicesVersion = "15.0.1"
    firebaseVersion = "15.0.2"
    gradle3EXPERIMENTAL = "yes"
    androidMapsUtilsVersion="0.5+"
}

Without seeing your android/build.gradle file it's a bit difficult to parse exactly why you'd be having this problem.

from react-native-boundary.

TareqAbughosh avatar TareqAbughosh commented on July 21, 2024

I think maven { url "https://jitpack.io" } is the one thats causing the build to fail. Im gonna check it out when I get the chance and let u guys know!

Thanks!

from react-native-boundary.

TareqAbughosh avatar TareqAbughosh commented on July 21, 2024

I tried to copy to your build but it didnt work. I tried copying the maven{url "https://jitpack.io"} and It still didnt work.

My build :
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
        maven {
                url "https://maven.google.com"
            }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'

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

allprojects {
    repositories {
        mavenLocal()
                google()
        jcenter()
        maven {
                url "$rootDir/../node_modules/react-native/android"
            }
            maven {
                url "https://maven.google.com"
            }
        maven { url "https://jitpack.io" }
    }
}

ext {
    compileSdkVersion = 26
    minSdkVersion = 16
    targetSdkVersion = 26
    buildToolsVersion = "27.0.3"
    supportLibVersion = "27.1.0"
    googlePlayServicesVersion = "15.0.1"
    firebaseVersion = "15.0.2"
    gradle3EXPERIMENTAL = "yes"
    androidMapsUtilsVersion="0.5+"
}

from react-native-boundary.

eddieowens avatar eddieowens commented on July 21, 2024

@TareqAbughosh, what's the exact error you're getting?

from react-native-boundary.

TareqAbughosh avatar TareqAbughosh commented on July 21, 2024

@eddieowens I had the same error the OP had. I fixed it and its working great now then I had way more errors that I can't even remember... But they were dependencies errors. Just 1 question though.. Can I use this in the background? or at least register it as a service?(if yes, do u have any package that does that? or at least a page where it explains how to do it?)
Heres my android/build.gradle file (I've more than just this package..)

New Text Document.txt

Thanks a lot for the help and for this package!

from react-native-boundary.

eddieowens avatar eddieowens commented on July 21, 2024

@TareqAbughosh that's great! Yes this library works in the background as long as you follow the README but there are some problems with Android being inconsistent and I can't figure out why. I have a question posted here to hopefully get some help. If you have any suggestions as to why this may happen I'd love to hear them or if you can upvote my question to increase its visibility that'd be great. iOS has no problems though and works as expected.

from react-native-boundary.

TareqAbughosh avatar TareqAbughosh commented on July 21, 2024

I'm not sure why!

I used another package to run it in the background But I reckon using a webview from react native would also execute the job right?

P.S: I tried to upvote u but it said I don't have enough rep (Cuz I just made the account :X)

from react-native-boundary.

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.