2

我正在维护一个棕地 react-native 应用程序,并且正在将 react-native 版本从 0.59.9 迁移到 0.63.4。我完成了更改日志和升级助手中定义的步骤,并且可以在模拟器上运行该应用程序,但是当我尝试构建它时,我在bundleDebugAar步骤中收到此错误:

> Direct local .aar file dependencies are not supported when building an 
AAR. The resulting AAR would be broken because the classes and Android 
resources from any local .aar file dependencies would not be packaged in 
the resulting AAR. Previous versions of the Android Gradle Plugin produce 
broken AARs in this case too (despite not throwing this error). The 
following direct local .aar file dependencies of the :myapp-react-
integration project caused this error: /Users/.../node_modules/hermes-
engine/android/hermes-release.aar

摇篮版本:

const val BUILD_TOOLS_VERSION = "30.0.1"
const val GRADLE_VERSION = "4.0.1"

这是我的 build.gradle.kts:

plugins {
    id(BuildPlugins.androidLibrary)
    id(BuildPlugins.kotlinAndroid)
    id(BuildPlugins.kotlinAndroidExtensions)
    id(BuildPlugins.kotlinKapt)
    id(BuildPlugins.junit)
}

android{
    androidExtensions {
        isExperimental = true
    }
}

val react by extra {
    mapOf(
        "enableHermes" to true
    )
}

dependencies {

    // Dependencies for local unit tests
    // JUnit and Mockito
    junit5()
    mockito()
    testImplementation(TestLibraries.JUNIT4)

    api(Libraries.REACT_NATIVE)
    implementation("com.facebook.soloader:soloader:0.9.0")
    implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")


    implementation(Libraries.Tracking.SNOWPLOW)
    implementation(project(Libraries.Tracking.BRAZE_REACT_NATIVE))

    rx()
    dagger()
    firebase()
    implementation(Libraries.gson)
    implementation(Libraries.Timber)
    implementation(Libraries.AndroidX.PREFERENCE)
    implementation(TestLibraries.Espresso.IDLING)
    androidTestRuntimeOnly(TestLibraries.Junit5.RUNNER)

    /********************************************/
    /*                 REACT                    */
    /** ******************************************/
    val hermesPath = "$rootDir/node_modules/hermes-engine/android/"
    debugImplementation(files(hermesPath + "hermes-debug.aar"))
    releaseImplementation(files(hermesPath + "hermes-release.aar"))
}

如果有人可以提供帮助,我会很高兴。

谢谢。

4

0 回答 0