gpt4 book ai didi

javascript - react native 屏幕 : compileDebugKotlin Error

转载 作者:行者123 更新时间:2023-12-05 03:28:10 34 4
gpt4 key购买 nike

失败:构建失败,出现异常。

  • 出了什么问题:任务“:react-native-screens:compileDebugKotlin”执行失败。

Error while evaluating property 'filteredArgumentsMap' of task ':react-native-screens:compileDebugKotlin'Could not resolve all artifacts for configuration ':react-native-screens:debugCompileClasspath'.> Failed to transform core-ktx-1.5.0.aar (androidx.core:core-ktx:1.5.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.> Execution failed for AarToClassTransform: C:\Users\ABC.gradle\caches\transforms-3\186e662719f643b770233b2443ab0f39\transformed\jetified-core-ktx-1.5.0.aar.> zip END header not found

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。

  • https://help.gradle.org 获得更多帮助

构建在 28 秒内失败

at makeError (D:\ReactNative\todo\node_modules\execa\index.js:174:9)
at D:\ReactNative\todo\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\ReactNative\todo\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\ReactNative\todo\node_modules\@react-native-community\cli\build\index.js:192:9)

info 使用 --verbose 标志运行 CLI 以获取更多详细信息。请帮我解决这个问题

最佳答案

在这里找到了正确的解决方案。这对我有用。 https://github.com/software-mansion/react-native-screens/issues/1369#issuecomment-1105152720 :

In my android/build.gradle file i change this:

buildscript {
ext {
// ...
kotlin_version = '1.6.10' // <- add this line
}

dependencies {
// ...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // <- add this line
// ...
}
}

and I also add increased the memory in android/gradle.properties: org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m

关于javascript - react native 屏幕 : compileDebugKotlin Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71280808/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com