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

Bug:error while building an app using expo #458

Closed
Dev-mininos opened this issue Aug 21, 2024 · 9 comments
Closed

Bug:error while building an app using expo #458

Dev-mininos opened this issue Aug 21, 2024 · 9 comments

Comments

@Dev-mininos
Copy link

Dev-mininos commented Aug 21, 2024

Hello,
I encountred this issue while executing npx expo run:android:

Task :expensify_react-native-live-markdown:compileDebugJavaWithJavac FAILED
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expensify\react-native-live-markdown\android\src\main\java\com\expensify\livemarkdown\MarkdownUtils.java:14: error: cannot find symbol
import com.facebook.react.views.text.CustomLineHeightSpan;
                                    ^
  symbol:   class CustomLineHeightSpan
  location: package com.facebook.react.views.text
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expensify\react-native-live-markdown\android\src\main\java\com\expensify\livemarkdown\MarkdownUtils.java:155: error: cannot find symbol
        CustomLineHeightSpan[] spans = ssb.getSpans(0, ssb.length(), CustomLineHeightSpan.class);
        ^
  symbol:   class CustomLineHeightSpan
  location: class MarkdownUtils
C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expensify\react-native-live-markdown\android\src\main\java\com\expensify\livemarkdown\MarkdownUtils.java:155: error: cannot find symbol
        CustomLineHeightSpan[] spans = ssb.getSpans(0, ssb.length(), CustomLineHeightSpan.class);
                                                                     ^
  symbol:   class CustomLineHeightSpan
  location: class MarkdownUtils
Note: C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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: C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\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.
8 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 22s
177 actionable tasks: 37 executed, 140 from cache
Error: C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
Error: C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
    at ChildProcess.completionListener (C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expo\spawn-async\build\spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:634:26)
    at ChildProcess.emit (node:events:519:28)
    at cp.emit (C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at spawnAsync (C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expo\spawn-async\build\spawnAsync.js:7:23)
    at spawnGradleAsync (C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expo\cli\build\src\start\platforms\android\gradle.js:96:48)
    at assembleAsync (C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expo\cli\build\src\start\platforms\android\gradle.js:74:18)
    at runAndroidAsync (C:\Users\Esprit\Desktop\React-Native-Projects\notion_clone_prisma\node_modules\@expo\cli\build\src\run\android\runAndroidAsync.js:45:37)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.</code>

Any fixes for this error?
Note:i'm currently using expo sdk latest version (51) and the latest version of @expensify/react-native-live-markdown
thanks !

@tomekzaw
Copy link
Collaborator

tomekzaw commented Sep 2, 2024

Hi @Dev-mininos, thanks for reporting this issue.

For Expo SDK 51 (and RN 0.74) support, please bump @expensify/react-native-live-markdown to 0.1.122 or newer (current latest is 0.1.125).

@ningacoding
Copy link

ningacoding commented Sep 10, 2024

Expo: eas build Execution failed for task ':expensify_react-native-live-markdown:compileDebugJavaWithJavac'.

When running

eas build --clear-cache -p android --profile=development

using

"@expensify/react-native-live-markdown": "^0.1.133",

Error occurs:

Execution failed for task ':expensify_react-native-live-markdown:compileDebugJavaWithJavac'.

Details:

> Task :expensify_react-native-live-markdown:compileDebugJavaWithJavac
/home/expo/workingdir/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
      TextLayoutManager.getOrCreateSpannableForText(context, attributedString, null);
                                                             ^
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:73: error: cannot find symbol
        paragraphAttributes.getString(TextLayoutManager.PA_KEY_TEXT_BREAK_STRATEGY));
                                                       ^
  symbol:   variable PA_KEY_TEXT_BREAK_STRATEGY
  location: class TextLayoutManager
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:75: error: cannot find symbol
      paragraphAttributes.contains(TextLayoutManager.PA_KEY_INCLUDE_FONT_PADDING)
                                                    ^
  symbol:   variable PA_KEY_INCLUDE_FONT_PADDING
  location: class TextLayoutManager
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:76: error: cannot find symbol
        ? paragraphAttributes.getBoolean(TextLayoutManager.PA_KEY_INCLUDE_FONT_PADDING)
                                                          ^
  symbol:   variable PA_KEY_INCLUDE_FONT_PADDING
  location: class TextLayoutManager
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:80: error: cannot find symbol
        paragraphAttributes.getString(TextLayoutManager.PA_KEY_HYPHENATION_FREQUENCY));
                                                       ^
  symbol:   variable PA_KEY_HYPHENATION_FREQUENCY
  location: class TextLayoutManager
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:91: error: cannot find symbol
    Layout.Alignment alignment = TextLayoutManager.getTextAlignment(attributedString, text);
                                                  ^
  symbol:   method getTextAlignment(MapBuffer,Spannable)
  location: class TextLayoutManager
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:114: error: cannot find symbol
        paragraphAttributes.contains(TextLayoutManager.PA_KEY_MAX_NUMBER_OF_LINES)
                                                      ^
  symbol:   variable PA_KEY_MAX_NUMBER_OF_LINES
  location: class TextLayoutManager
/home/expo/workingdir/build/node_modules/@expensify/react-native-live-markdown/android/src/main/java/com/expensify/livemarkdown/CustomMountingManager.java:115: error: cannot find symbol
          ? paragraphAttributes.getInt(TextLayoutManager.PA_KEY_MAX_NUMBER_OF_LINES)
                                                        ^
  symbol:   variable PA_KEY_MAX_NUMBER_OF_LINES
  location: class TextLayoutManager

@arpitv96171
Copy link

@ningacoding use following versions according to your react native version:
0.74: @expensify/react-native-live-markdown: 0.1.128
0.73: @expensify/react-native-live-markdown: 0.1.121

@ahilles107
Copy link

Does it mean that we can't use the latest releases and need to stick to 0.1.128 with expo51/rn74?

@ningacoding
Copy link

Does it mean that we can't use the latest releases and need to stick to 0.1.128 with expo51/rn74?

Wich is a bad "solution" 🫠

@ahilles107
Copy link

@arpitv96171 can you tell us with which React Native version the latest library release is compatible?

@arpitv96171
Copy link

@arpitv96171 can you tell us with which React Native version the latest library release is compatible?

@ahilles107 Latest one works with react native 0.75

@ansh
Copy link

ansh commented Oct 21, 2024

Expo SDK 51 does not work with the latest version as of today. (0.1.175)

@tomekzaw
Copy link
Collaborator

Just FYI, I've added compatibility table to README in #526.

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

6 participants