Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find class UIBlock when run react-native run-android #2090

Closed
MatheusGit opened this issue Mar 14, 2018 · 3 comments
Closed

cannot find class UIBlock when run react-native run-android #2090

MatheusGit opened this issue Mar 14, 2018 · 3 comments

Comments

@MatheusGit
Copy link

MatheusGit commented Mar 14, 2018

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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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\fruttinee\node_modules\react-native-maps\lib\android\src\main\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

@alexdunne
Copy link

@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"
        }
    }
}

@rborn
Copy link
Collaborator

rborn commented Mar 19, 2018

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

@alexjorgef
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants