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

[Expo 50] Execution failed for task ':react-native-square-in-app-payments:compileDebugJavaWithJavac'. #235

Closed
kuldip-simform opened this issue Apr 19, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@kuldip-simform
Copy link

Describe the issue

I have upgraded to new expo version 50 and then I started build in eas but I am getting this error.
Execution failed for task ':react-native-square-in-app-payments:compileDebugJavaWithJavac'.

To Reproduce

Steps to reproduce the issue.

For example -

  1. Add this module in expo project
  2. run eas build for android devclient

Expected behavior

It should be create build without any error.

Environment (please complete the following information):
System:
OS: macOS 13.5.1
CPU: (8) arm64 Apple M1
Memory: 65.03 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 21.6.2
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.18
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.4
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.01.22.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.15
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.6
wanted: 0.73.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

Screenshots

Screenshot 2024-04-19 at 3 47 33 PM

Additional context

@kuldip-simform kuldip-simform added the bug Something isn't working label Apr 19, 2024
@kuldip-simform
Copy link
Author

I am using Expo 50. I have tried in 2 other projects which use Expo 50. In all the projects build is failing. If I remove this package, then the build is a success.

@kuldip-simform kuldip-simform changed the title Execution failed for task ':react-native-square-in-app-payments:compileDebugJavaWithJavac'. [Expo 50] Execution failed for task ':react-native-square-in-app-payments:compileDebugJavaWithJavac'. Apr 22, 2024
@YoussefHenna
Copy link

This seems to be culprit

node_modules\react-native-square-in-app-payments\android\src\main\java\sqip\react\CardEntryModule.java:304: error: cannot find symbol
    theme.applyStyle(R.style.sqip_Theme_CardEntry, true);

@YoussefHenna
Copy link

Possibly duplicate of #229

@kuldip-simform
Copy link
Author

Do you know how to fix this @YoussefHenna

@kuldip-simform
Copy link
Author

Thank you @YoussefHenna for your response. I am currently running build. Update here status of that once build is done.

@YoussefHenna
Copy link

Commenting the line out with this patch works as suggested in #229

react-native-square-in-app-payments+1.7.5.patch

diff --git a/node_modules/react-native-square-in-app-payments/android/src/main/java/sqip/react/CardEntryModule.java b/node_modules/react-native-square-in-app-payments/android/src/main/java/sqip/react/CardEntryModule.java
index 9fe2a7e..2c906b0 100644
--- a/node_modules/react-native-square-in-app-payments/android/src/main/java/sqip/react/CardEntryModule.java
+++ b/node_modules/react-native-square-in-app-payments/android/src/main/java/sqip/react/CardEntryModule.java
@@ -301,7 +301,7 @@ class CardEntryModule extends ReactContextBaseJavaModule {
   private long readCardEntryCloseExitAnimationDurationMs() {
     long delayDurationMs = 0;
     Resources.Theme theme = Objects.requireNonNull(getCurrentActivity()).getResources().newTheme();
-    theme.applyStyle(R.style.sqip_Theme_CardEntry, true);
+    // theme.applyStyle(R.style.sqip_Theme_CardEntry, true);
     int[] attrs = { android.R.attr.activityCloseExitAnimation };
     TypedArray typedArray = theme.obtainStyledAttributes(null, attrs, android.R.attr.windowAnimationStyle, 0);
     int resId = typedArray.getResourceId(0, -1);

@kuldip-simform
Copy link
Author

Yes, this patch works. @YoussefHenna Thank you.
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants