react-native-background-geolocation: Help! Could not find support-v4.jar (com.android.support:support-v4:26.1.0)??

Your Environment

  • Plugin version: "react-native-mauron85-background-geolocation": "0.4.1"
  • Platform: Android
  • OS version: Android 7.0
  • Device manufacturer and model: SAMSUNG A7
  • React Native version: "react-native": "0.50.3"
  • android’s build.gradle compileSdkVersion 23, buildToolsVersion "23.0.2"

Context

Can not build project, this error shown

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-mauron85-background-geolocation'.
      > Could not find support-v4.jar (com.android.support:support-v4:26.1.0).
        Searched in the following locations:
            https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.jar

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20

Most upvoted comments

move jcenter() after maven(). It works for me.

I can confirm that I could get my build moving jcenter() AFTER google() repo.

Dont know why… but this works for me…

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

I am facing the same problem. What I’ve found so far is that https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.jar return a 404 and the support-v4/ directory has only a maven-metadata.xml file. If I move jcenter() after the other repos, the app builds but I’m not sure this a solution since I still cannot get a working Android build.

@lfiorini @mauron85 @catcheshirecat after apply you guys tip I found another error which similar to #210 but here is my detail

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

:react-native-mauron85-background-geolocation:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-mauron85-background-geolocation:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

already stuck here for weeks. please help 💯

Thank you so much!

@mauron85 still not working brother 😦