Reputation: 51
FAILURE: Build failed with an exception.
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
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
BUILD FAILED in 28s
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 Run CLI with --verbose flag for more details. please help me out with this
Upvotes: 5
Views: 11520
Reputation: 1007
I fixed similar issue by upgrading version of react-native-screens from 3.1.0 to 3.1.1
My Application have following package dependencies:
"react": "17.0.1",
"react-native": "0.64.0",
I was using Node 14.18.1. Hope this helps.
Upvotes: 0
Reputation: 91
Found the correct solution here. This worked for me. 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
Upvotes: 9
Reputation: 11
I had faced same issue last week but no solution found online. I'd created new project and copied the App.js, other JS files (contain development code) of the old project to new project folder. In this way I resolved this issue.
Upvotes: 1