在预验证时反应本机运行Android错误

时间:2020-02-05 08:20:47

标签: android react-native

我尝试使用react-native run-android命令运行react native项目,但是显示98%的错误,并且该过程以错误结束。请检查以下错误。

Unexpected error while performing partial evaluation:
Class       = [com/airbnb/android/react/maps/AirMapView]
Method      = [fitToElements(Z)V]
Exception   = [java.lang.IllegalArgumentException] (Can't find common super class of 
[java/util/Iterator] (with 2 known super classes) and [com/google/android/gms/maps/model/LatLngBounds] (with 1 known super classes))
Unexpected error while preverifying:
Class       = [com/airbnb/android/react/maps/AirMapView]
Method      = [fitToElements(Z)V]
Exception   = [java.lang.IllegalArgumentException] (Can't find common super class of [java/util/Iterator] (with 2 known super classes) and [com/google/android/gms/maps/model/LatLngBounds] (with 1 known super classes))

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'.
> java.io.IOException: java.lang.IllegalArgumentException: Can't find common super class of [java/util/Iterator] (with 2 known super classes) and [com/google/android/gms/maps/model/LatLngBounds] (with 1 known super classes)

我不知道如何解决上述问题。我认为问题出在react-native-maps库中。请检查以下详细信息

build.gradle

dependencies {
    implementation project(':@react-native-community_async-storage')
    implementation project(':@react-native-community_netinfo')
    implementation project(':react-native-gesture-handler')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "com.android.support:multidex:1.0.3"
    implementation project(":react-native-image-zoom")
    implementation project(":react-native-photo-view")
    implementation project(":react-native-vector-icons")
    implementation project(":react-native-video")
    implementation (project(":react-native-fcm")) {
        exclude group: "com.google.firebase"
    }
    implementation (project(":react-native-maps")) {
        exclude group: "com.google.android.gms", module: "play-services-base"
        exclude group: "com.google.android.gms", module: "play-services-maps"
    }
    implementation 'com.google.android.gms:play-services-base:10.0.1'
    implementation 'com.google.android.gms:play-services-maps:10.0.1'
    implementation project(":react-native-image-picker")
    implementation project(":react-native-fcm")
    implementation project(":react-native-svg")
    implementation ('com.google.firebase:firebase-messaging:10.2.1') {
        force = true;
    }

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

package.json

"react": "16.9.0",
"react-native": "0.61.5",
"react-native-camera": "^3.16.0",
"react-native-maps": "^0.26.1",

我要去哪里错了?我真的被困在这里。有谁知道该解决方案,它将非常有效。

0 个答案:

没有答案