React Native Task: response-native-maps: compileDebugJavaWithJavac FAILED - PullRequest
0 голосов
/ 28 октября 2019

Я установил response-native-maps, но когда я запускаю реактив-native run-android, я получил эту ошибку:

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.

response-native-ссылка response-native-maps работает только для ios. Я связал его вручную, но он не работает.

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

Что делатьмне нужно сделать, чтобы решить это?

...