Skip to content
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

Missing support for React Native 0.74.2 #438

Closed
abdulmateentechbits opened this issue Jul 20, 2024 · 8 comments
Closed

Missing support for React Native 0.74.2 #438

abdulmateentechbits opened this issue Jul 20, 2024 · 8 comments

Comments

@abdulmateentechbits
Copy link

abdulmateentechbits commented Jul 20, 2024

With Fresh React native expo project facing this issue ( i am using prebuild as per react-native-live-markdown documentation)

"react-native": "0.74.2"
 "@expensify/react-native-live-markdown": "^0.1.108"
"expo": "~51.0.8"

Error

> Task :expensify_react-native-live-markdown:compileDebugJavaWithJavac FAILED
/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:24: error: cannot find symbol
import com.facebook.react.views.text.TextInlineViewPlaceholderSpan;
                                    ^
  symbol:   class TextInlineViewPlaceholderSpan
  location: package com.facebook.react.views.text
/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:163: error: cannot find symbol
          text.nextSpanTransition(i, text.length(), TextInlineViewPlaceholderSpan.class);
                                                    ^
  symbol:   class TextInlineViewPlaceholderSpan
  location: class CustomMountingManager
/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:164: error: cannot find symbol
        TextInlineViewPlaceholderSpan[] placeholders =
        ^
  symbol:   class TextInlineViewPlaceholderSpan
  location: class CustomMountingManager
/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:165: error: cannot find symbol
          text.getSpans(i, lastAttachmentFoundInSpan, TextInlineViewPlaceholderSpan.class);
                                                      ^
  symbol:   class TextInlineViewPlaceholderSpan
  location: class CustomMountingManager
/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:166: error: cannot find symbol
        for (TextInlineViewPlaceholderSpan placeholder : placeholders) {
             ^
  symbol:   class TextInlineViewPlaceholderSpan
  location: class CustomMountingManager
Note: /Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/MarkdownFontFamilySpan.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomFabricUIManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':expensify_react-native-live-markdown:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

BUILD FAILED in 36s
249 actionable tasks: 38 executed, 201 from cache, 10 up-to-date
Error: /Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86_64 exited with non-zero code: 1
Error: /Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86_64 exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:632:26)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:303:5)
    ...
    at spawnAsync (/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawnGradleAsync (/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:96:48)
    at assembleAsync (/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:74:18)
    at runAndroidAsync (/Users/sleepdev-1/Desktop/apps/practice-apps/keep-memo/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:45:37)
error Command failed with exit code 1.
@tomekzaw
Copy link
Collaborator

tomekzaw commented Jul 20, 2024

Hi @abdulmateentechbits, thanks for opening this issue.

Looks like this issue is a duplicate of #221.

Support for 0.74 will be added in #358.

@tomekzaw
Copy link
Collaborator

Closing this since #358 was merged.

@DrZoidberg09
Copy link

@tomekzaw is #358 already in a release? I am asking because I still get this issue that gradle 9.0 is not supported.

@tomekzaw
Copy link
Collaborator

tomekzaw commented Sep 30, 2024

@DrZoidberg09 Yes, #358 was released in 0.1.122 and #428 was released in 0.1.129.

@DrZoidberg09
Copy link

Strange. I get this error when building for android with the current expo 51 and rn 74.5(iOS is totally fine). Exactly the message that there are functions that are not compatible with gradle 9.0 anymore.

@DrZoidberg09
Copy link

@tomekzaw this is the error output I get when building the newest version of react-native-live-markdown on Expo 51

[RUN_GRADLEW] > Task :expensify_react-native-live-markdown:compileReleaseJavaWithJavac FAILED
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:65: error: incompatible types: MapBuffer cannot be converted to ReadableMap
[RUN_GRADLEW] TextLayoutManager.getOrCreateSpannableForText(context, attributedString, null);
[RUN_GRADLEW] ^
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:73: error: cannot find symbol
[RUN_GRADLEW] paragraphAttributes.getString(TextLayoutManager.PA_KEY_TEXT_BREAK_STRATEGY));
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: variable PA_KEY_TEXT_BREAK_STRATEGY
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:75: error: cannot find symbol
[RUN_GRADLEW] paragraphAttributes.contains(TextLayoutManager.PA_KEY_INCLUDE_FONT_PADDING)
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: variable PA_KEY_INCLUDE_FONT_PADDING
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:76: error: cannot find symbol
[RUN_GRADLEW] ? paragraphAttributes.getBoolean(TextLayoutManager.PA_KEY_INCLUDE_FONT_PADDING)
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: variable PA_KEY_INCLUDE_FONT_PADDING
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:80: error: cannot find symbol
[RUN_GRADLEW] paragraphAttributes.getString(TextLayoutManager.PA_KEY_HYPHENATION_FREQUENCY));
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: variable PA_KEY_HYPHENATION_FREQUENCY
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:91: error: cannot find symbol
[RUN_GRADLEW] Layout.Alignment alignment = TextLayoutManager.getTextAlignment(attributedString, text);
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: method getTextAlignment(MapBuffer,Spannable)
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:114: error: cannot find symbol
[RUN_GRADLEW] paragraphAttributes.contains(TextLayoutManager.PA_KEY_MAX_NUMBER_OF_LINES)
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: variable PA_KEY_MAX_NUMBER_OF_LINES
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:115: error: cannot find symbol
[RUN_GRADLEW] ? paragraphAttributes.getInt(TextLayoutManager.PA_KEY_MAX_NUMBER_OF_LINES)
[RUN_GRADLEW] ^
[RUN_GRADLEW] symbol: variable PA_KEY_MAX_NUMBER_OF_LINES
[RUN_GRADLEW] location: class TextLayoutManager
[RUN_GRADLEW] Note: /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/MarkdownFontFamilySpan.java uses or overrides a deprecated API.
[RUN_GRADLEW] Note: Recompile with -Xlint:deprecation for details.
[RUN_GRADLEW] Note: /private/var/folders/_1/_h6wgp2x55d1xw8tpk9l5kd40000gn/T/eas-build-local-nodejs/77eb7d0d-b3b7-4af0-9ff9-2b57dc201255/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomFabricUIManager.java uses unchecked or unsafe operations.
[RUN_GRADLEW] Note: Recompile with -Xlint:unchecked for details.
[RUN_GRADLEW] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[RUN_GRADLEW] 8 errors
[RUN_GRADLEW] > Task :app:processReleaseResources
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':expensify_react-native-live-markdown:compileReleaseJavaWithJavac'.
[RUN_GRADLEW] > Compilation failed; see the compiler error output for details.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --info option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] BUILD FAILED in 1m 46s
[RUN_GRADLEW] Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
[RUN_GRADLEW] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[RUN_GRADLEW] For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
[RUN_GRADLEW] 406 actionable tasks: 406 executed
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Build failed
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
npx exited with non-zero code: 1
Error: build command failed.

@tomekzaw
Copy link
Collaborator

tomekzaw commented Oct 1, 2024

@DrZoidberg09 Expo SDK 51 comes with RN 0.74 by default. Latest release of RNLiveMarkdown supports only RN 0.75.

@DrZoidberg09
Copy link

@tomekzaw Thank you very much. That was it.

This wasnt clear to me at all as it did not seem logical to me that 0.74 is not working and I must have missed it in the docs.

Keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants