-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execution failed for task ':react-native-navigation:compileReactNative71DebugKotlin'. #7819
Comments
Java version: OpenJDK 64-Bit Server VM Zulu17.46+19-CA (build 17.0.9+8-LTS, mixed mode, sharing) |
I'm having the same issue, tried installing openjdk 11 and setting targetsdk.
|
You can manually update update theses files for now
|
@hachther , could you please share your MainApplication.kt? I did the updates you suggested (thanks for it) but I have a definite error. |
Open JDK 17 Install |
|
Thank You. It worked perfectly. I did the conversion of the class wrongly. |
@hachther Made these changes but still running into the same error:
|
Before the official supports RN v0.73, try the steps, it works for me:
const fs = require('node:fs')
const path = require('node:path')
const rootPath = path.join(__dirname, './')
const patchs = [
[
path.join(rootPath, './node_modules/react-native-navigation/lib/android/app/build.gradle'),
`
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}`,
'',
],
[
path.join(rootPath, './node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt'),
`override fun onInitializeAccessibilityNodeInfo(
host: View?,
info: AccessibilityNodeInfoCompat?
) {
super.onInitializeAccessibilityNodeInfo(host, info)
// Expose the testID prop as the resource-id name of the view. Black-box E2E/UI testing
// frameworks, which interact with the UI through the accessibility framework, do not have
// access to view tags. This allows developers/testers to avoid polluting the
// content-description with test identifiers.
val testId = host?.tag as String?
if(testId != null){
info!!.viewIdResourceName = testId
}
}`,
`override fun onInitializeAccessibilityNodeInfo(
host: View,
info: AccessibilityNodeInfoCompat
) {
super.onInitializeAccessibilityNodeInfo(host, info)
// Expose the testID prop as the resource-id name of the view. Black-box E2E/UI testing
// frameworks, which interact with the UI through the accessibility framework, do not have
// access to view tags. This allows developers/testers to avoid polluting the
// content-description with test identifiers.
val testId = host.tag as String?
if(testId != null){
info.viewIdResourceName = testId
}
}`,
],
]
;(async() => {
for (const [filePath, fromStr, toStr] of patchs) {
console.log(`Patching ${filePath.replace(rootPath, '')}`)
try {
const file = (await fs.promises.readFile(filePath)).toString()
await fs.promises.writeFile(filePath, file.replace(fromStr, toStr))
} catch (err) {
console.error(`Patch ${filePath.replace(rootPath, '')} failed: ${err.message}`)
}
}
console.log('\nDependencies patch finished.\n')
})()
|
Hi @OskarEichler could you show me the file MainApplication.kt & MainActivity.kt? |
Hey @HaNguyenRN Please find both files attached (had to change the file extension to .txt in order to upload them here, so please change back to .kt). Thanks for looking into this! |
I'm the only one that didn't understand where to copy the dependencies in the gradle file?
In every way I copy the code I receive and error.
@OskarEichler can you help me please? |
@elmalakomar its inside of the
|
Ok, I tried as you suggested but I'm still getting the same error. I need to do something else? run some script? @kauly
|
Try to do the same thing but in the build.gradle of the rnn library |
I fixed running the script suggested a few comments above |
this worked for me thanks @kauly |
im getting this error if anyone knows how to fix it please help me main error:
Run with --info option to get more log output.
complete expo.dev run geadlew log:
Run with --info option to get more log output.
|
FAILURE: Build failed with an exception.
Run with --info option to get more log output.
|
Whether you have jdk 1.8 and 11 installed on your computer, you do not need to make any changes below. compileOptions { |
@ertugruldogan so what should i do now? react native version: 10.7.2 build.gradle: group = 'host.exp.exponent' buildscript { // Simple helper that allows the root project to override versions declared by this library. // Ensures backward compatibility repositories { dependencies { // Creating sources with comments afterEvaluate { android { compileOptions { kotlinOptions { defaultConfig { dependencies { implementation 'com.android.installreferrer:installreferrer:1.0' if (project.findProject(':expo-modules-test-core')) { package.json: ReactTypeFaceUtils : /*
// This file was copied over from react-native package com.reactnativenavigation.utils; import android.content.res.AssetManager; public class ReactTypefaceUtils { public static int parseFontWeight(@nullable String fontWeightString) {
} public static int parseFontStyle(@nullable String fontStyleString) {
} public static @nullable String parseFontVariant(@nullable ReadableArray fontVariantArray) {
} public static Typeface applyStyles(
} /**
|
I was able to fix the issue in 2 parts by first upgrading |
What happened?
Execution failed for task ':react-native-navigation:compileReactNative71DebugKotlin'.
What was the expected behaviour?
...
Was it tested on latest react-native-navigation?
Help us reproduce this issue!
...
In what environment did this happen?
React Native Navigation version: 7.37.2
React Native version: 0.73.0
Node version: v20.3.0
Device model: Pixel
Android version: 14
Tasks
The text was updated successfully, but these errors were encountered: