React-native-mapbox-gl: Build fails due to ':mapbox-react-native-mapbox-gl:compileReleaseJavaWithJavac'

Created on 25 Feb 2018  路  1Comment  路  Source: nitaliano/react-native-mapbox-gl

After executing react-native run-android, the build fails with:

```7 errors
:mapbox-react-native-mapbox-gl:compileReleaseJavaWithJavac FAILED

What went wrong:
Execution failed for task ':mapbox-react-native-mapbox-gl:compileReleaseJavaWithJavac'.

There are 7, similar "cannot find symbol" message like the one below

:mapbox-react-native-mapbox-gl:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

import com.facebook.react.bridge.DynamicFromMap;
^
symbol: class DynamicFromMap
location: package com.facebook.react.bridge
/Users/x/react-native-apps/app/node_modules/@mapbox/react-native-mapbox-gl/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.java:10: error: package com.facebook.react.views.imagehelper does not exist

I am building with the following versions
"@mapbox/react-native-mapbox-gl": "^6.0.3",
"react": "16.2.0",
"react-native": "0.51.0",
Relevant parts in Build.gradle are:

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"

defaultConfig {
    applicationId "com.app"
    minSdkVersion 16
    targetSdkVersion 26
   ...
}

....
```

Most helpful comment

I think this issue should be closed. The error was caused by an incorrect definition in file android/build.gradle.
The urls were all put under one "maven":

        maven {
            url "$rootDir/../node_modules/react-native/android"
            url "https://jitpack.io" 
            url "https://maven.google.com" 
 }

as opposed to

maven { url "$rootDir/../node_modules/react-native/android" }
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }

>All comments

I think this issue should be closed. The error was caused by an incorrect definition in file android/build.gradle.
The urls were all put under one "maven":

        maven {
            url "$rootDir/../node_modules/react-native/android"
            url "https://jitpack.io" 
            url "https://maven.google.com" 
 }

as opposed to

maven { url "$rootDir/../node_modules/react-native/android" }
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

EugenePisotsky picture EugenePisotsky  路  4Comments

igor9silva picture igor9silva  路  3Comments

yaduc picture yaduc  路  3Comments

olofd picture olofd  路  3Comments

max-prokopenko picture max-prokopenko  路  4Comments