Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28480

React Native Task :react-native-maps:compileDebugJavaWithJavac FAILED

$
0
0

I installed react-native-maps but when i run react-native run-android i got this error:

C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:12: error: package androidx.core.view does not exist
import androidx.core.view.GestureDetectorCompat;
                         ^
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:13: error: package androidx.core.view does not exist
import androidx.core.view.MotionEventCompat;
                         ^
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:22: error: package androidx.core.content.PermissionChecker does not exist
import androidx.core.content.PermissionChecker.checkSelfPermission;
                                              ^
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:74: error: package androidx.core.content does not exist
import static androidx.core.content.PermissionChecker.checkSelfPermission;
                                   ^
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:74: error: static import only from classes and interfaces
import static androidx.core.content.PermissionChecker.checkSelfPermission;
^
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:109: error: cannot find symbol
  private final GestureDetectorCompat gestureDetector;
                ^
  symbol:   class GestureDetectorCompat
  location: class AirMapView
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:161: error: cannot find symbol
    gestureDetector = new GestureDetectorCompat(reactContext, new GestureDetector.SimpleOnGestureListener() {
                          ^
  symbol:   class GestureDetectorCompat
  location: class AirMapView
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:422: error: cannot find symbol
    return checkSelfPermission(getContext(), PERMISSIONS[0]) == PackageManager.PERMISSION_GRANTED
           ^
  symbol:   method checkSelfPermission(Context,String)
  location: class AirMapView
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:423: error: cannot find symbol
        || checkSelfPermission(getContext(), PERMISSIONS[1]) == PackageManager.PERMISSION_GRANTED;
           ^
  symbol:   method checkSelfPermission(Context,String)
  location: class AirMapView
C:\Users\Emre\example\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:956: error: cannot find symbol
    int action = MotionEventCompat.getActionMasked(ev);
                 ^
  symbol:   variable MotionEventCompat
  location: class AirMapView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
10 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. Run with --scan to get full insights.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BU¦LD FAILED in 3s
19 actionable tasks: 2 executed, 17 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

react-native link react-native-maps works for only ios. I linked it manually but it is not working.

"react-native": "0.59.9", "react-native-maps": "0.26.1",

What do i need to do to solve it?


Viewing all articles
Browse latest Browse all 28480

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>