React-native-maps: cannot find class UIBlock when run react-native run-android

Created on 14 Mar 2018  路  3Comments  路  Source: react-native-maps/react-native-maps

Is this a bug report?

Yes, cannot find class UIBlock when run react-native run-android


^
symbol: class UIBlock
location: package com.facebook.react.uimanager
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapView.java:105: error: getCurrentActivity()
is not public in ReactContext; cannot be accessed from outside package
if (!contextHasBug(appContext.getCurrentActivity())) {
^
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapView.java:106: error: getCurrentActivity()
is not public in ReactContext; cannot be accessed from outside package
superContext = appContext.getCurrentActivity();
^
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapView.java:109: error: cannot find symbol
if (!contextHasBug(reactContext.getCurrentActivity())) {
^
symbol: method getCurrentActivity()
location: variable reactContext of type ThemedReactContext
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapView.java:110: error: cannot find symbol
superContext = reactContext.getCurrentActivity();
^
symbol: method getCurrentActivity()
location: variable reactContext of type ThemedReactContext
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapMarkerManager.java:121: error: method does
not override or implement a method from a supertype
@Override
^
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapMarkerManager.java:124: error: cannot find
symbol
super.setZIndex(view, zIndex);
^
symbol: method setZIndex(AirMapMarker,float)
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapModule.java:89: error: cannot find symbol
uiManager.addUIBlock(new UIBlock() {
^
symbol: class UIBlock
location: class AirMapModule
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapModule.java:152: error: cannot find symbol

uiManager.addUIBlock(new UIBlock()
                         ^

symbol: class UIBlock
location: class AirMapModule
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\AirMapModule.java:187: error: cannot find symbol

uiManager.addUIBlock(new UIBlock()
                         ^

symbol: class UIBlock
location: class AirMapModule
C:\ReactNative\fruttineenode_modules\react-native-maps\lib\androidsrcmain\jav
a\com\airbnb\android\react\maps\RegionChangeEvent.java:15: error: no suitable co
nstructor found for Event(int)
super(id);
^
constructor Event.Event() is not applicable
(actual and formal argument lists differ in length)
constructor Event.Event(int,long) is not applicable
(actual and formal argument lists differ in length)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-maps:compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 12s
56 actionable tasks: 19 executed, 37 up-to-date

Have you read the Installation Instructions?

Yes

Environment

react-native: 0.53.2
react: 16.2.0
react-native-maps: 0.20.1

Target Platform: eg: Android 7.1.1

Steps to Reproduce

  1. react-native run-android

Expected Behavior

"react-native run-android" build success

Actual Behavior

"react-native run-android" build failed

Most helpful comment

@MatheusGit
I had the same issue when doing:

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"
            url "https://maven.google.com"
        }
    }
}

Splitting out the maven urls like so worked:

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"
        }
        maven {
            url "https://maven.google.com"
        }
    }
}

All 3 comments

@MatheusGit
I had the same issue when doing:

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"
            url "https://maven.google.com"
        }
    }
}

Splitting out the maven urls like so worked:

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"
        }
        maven {
            url "https://maven.google.com"
        }
    }
}

@MatheusGit can you please confirm and it it works close the issue?

:+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Starl0rd77 picture Starl0rd77  路  67Comments

radubatori picture radubatori  路  46Comments

alvelig picture alvelig  路  340Comments

henrikra picture henrikra  路  44Comments

l1fe picture l1fe  路  48Comments