Hi,
We have integrated react-native-moyasar-apple-pay into the Expo project. It is working fine for iOS but failing on Android.
Error
FAILURE: Build failed with an exception.
-
Where:
Script '/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle' line: 40
-
What went wrong:
A problem occurred evaluating project ':react-native-moyasar-apple-pay'.
Failed to apply plugin class 'KotlinExpoModulesCorePlugin'.
Could not find method android() for arguments [KotlinExpoModulesCorePlugin$_apply_closure4@b4f8eb9] on project ':react-native-moyasar-apple-pay' of type org.gradle.api.Project.
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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1m 36s
15 actionable tasks: 14 executed, 1 from cache
Error: /Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/apps/pulse/android/gradlew exited with non-zero code: 1
Error: /Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/apps/pulse/android/gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:52: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 Object.spawnAsync [as default] (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
at spawnGradleAsync (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:72:46)
at Object.assembleAsync (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:52:18)
at runAndroidAsync (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:36:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ELIFECYCLE Command failed with exit code 1.
Steps to reproduce:
- pnpm i
- npx expo prebuild
- pnpm run android
Local Environments
JDK -> 21
Gradle -> 6.5, tried with versions 8.3, 7.5 as well
Package.json
`{
"name": "pulse",
"version": "2.0.1",
"private": true,
"main": "index.js",
"scripts": {
"clean": "git clean -xdf .expo .turbo node_modules",
"dev": "expo start",
"dev:android": "expo start --android",
"dev:ios": "expo start --ios",
"lint": "eslint --ext .ts,.tsx,.js,.jsx .",
"lint:fix": "pnpm lint --fix",
"type-check": "tsc --noEmit",
"android": "expo run:android",
"ios": "expo run:ios",
"bump-version": "bumpp"
},
"dependencies": {
"@appboxo/expo-boxo-sdk": "0.3.0",
"@backpackapp-io/react-native-toast": "0.10.0",
"@expo/config-plugins": "~7.8.0",
"@gorhom/bottom-sheet": "4.5.1",
"@hookform/resolvers": "3.3.1",
"@react-native-community/datetimepicker": "7.7.0",
"@react-native-community/masked-view": "0.1.11",
"@react-native-community/netinfo": "11.1.0",
"@react-native-firebase/analytics": "20.4.0",
"@react-native-firebase/app": "20.4.0",
"@react-navigation/native": "6.1.18",
"@salam/api": "workspace:",
"@salam/ui-native": "workspace:",
"@tanstack/react-query": "4.36.1",
"@trpc/client": "10.45.0",
"@trpc/react-query": "10.45.0",
"@ts-react/form": "1.8.3",
"babel-plugin-inline-import": "3.0.0",
"clsx": "2.1.0",
"dayjs": "1.11.10",
"expo": "~50.0.19",
"expo-blur": "~12.9.2",
"expo-build-properties": "~0.11.1",
"expo-checkbox": "~2.7.0",
"expo-clipboard": "~5.0.1",
"expo-constants": "~15.4.6",
"expo-dev-client": "~3.3.12",
"expo-device": "5.9.4",
"expo-document-picker": "~11.10.1",
"expo-file-system": "~16.0.9",
"expo-image": "~1.10.6",
"expo-insights": "~0.6.1",
"expo-linking": "~6.2.2",
"expo-localization": "~14.8.4",
"expo-location": "~16.5.5",
"expo-notifications": "~0.27.8",
"expo-router": "3.4.10",
"expo-secure-store": "~12.8.1",
"expo-splash-screen": "~0.26.5",
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.4",
"expo-updates": "~0.24.13",
"expo-web-browser": "~12.8.2",
"firebase": "10.12.2",
"i18next": "23.5.1",
"lucide-react-native": "0.363.0",
"moti": "0.28.1",
"nativewind": "4.0.36",
"react": "18.2.0",
"react-hook-form": "7.47.0",
"react-i18next": "14.1.0",
"react-native": "0.73.6",
"react-native-actions-sheet-picker": "0.3.5",
"react-native-circular-progress": "1.3.9",
"react-native-confirmation-code-field": "7.3.1",
"react-native-gesture-handler": "2.14.1",
"react-native-google-places-autocomplete": "2.5.6",
"react-native-keyboard-aware-scroll-view": "0.9.5",
"react-native-keyboard-controller": "1.11.3",
"react-native-magic-modal": "5.0.2",
"react-native-maps": "1.10.0",
"react-native-mask-text": "0.14.2",
"react-native-mmkv": "2.10.2",
"react-native-modal": "13.0.1",
"react-native-popup-menu": "0.16.1",
"react-native-reanimated": "~3.6.3",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "3.30.1",
"react-native-svg": "14.1.0",
"react-native-swiper": "1.6.0",
"react-native-webview": "13.6.4",
"superjson": "2.2.1",
"tailwind-merge": "2.2.0",
"zod": "3.22.4",
"zod-i18n-map": "2.20.0",
"zustand": "4.4.3",
"react-native-moyasar-apple-pay": "0.5.0"
},
"devDependencies": {
"@babel/core": "7.23.0",
"@expo/metro-config": "^0.17.6",
"@salam/eslint-config": "workspace:",
"@salam/tailwindcss": "workspace:",
"@salam/tsconfig": "workspace:*",
"@types/react": "~18.2.60",
"tailwindcss": "3.4.1",
"typescript": "5.1.3"
},
"eslintConfig": {
"root": true,
"extends": [
"@salam/eslint-config/base",
"@salam/eslint-config/react"
]
},
"prettier": "@salam/prettier-config"
}`
Hi,
We have integrated react-native-moyasar-apple-pay into the Expo project. It is working fine for iOS but failing on Android.
Error
Where:
Script '/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle' line: 40
What went wrong:
A problem occurred evaluating project ':react-native-moyasar-apple-pay'.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1m 36s
15 actionable tasks: 14 executed, 1 from cache
Error: /Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/apps/pulse/android/gradlew exited with non-zero code: 1
Error: /Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/apps/pulse/android/gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:52: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 Object.spawnAsync [as default] (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
at spawnGradleAsync (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:72:46)
at Object.assembleAsync (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:52:18)
at runAndroidAsync (/Users/muhammad.umerkhan/Desktop/Salam/salam-nexus/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:36:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ELIFECYCLE Command failed with exit code 1.
Steps to reproduce:
Local Environments
JDK -> 21
Gradle -> 6.5, tried with versions 8.3, 7.5 as well
Package.json
`{
"name": "pulse",
"version": "2.0.1",
"private": true,
"main": "index.js",
"scripts": {
"clean": "git clean -xdf .expo .turbo node_modules",
"dev": "expo start",
"dev:android": "expo start --android",
"dev:ios": "expo start --ios",
"lint": "eslint --ext .ts,.tsx,.js,.jsx .",
"lint:fix": "pnpm lint --fix",
"type-check": "tsc --noEmit",
"android": "expo run:android",
"ios": "expo run:ios",
"bump-version": "bumpp"
},
"dependencies": {
"@appboxo/expo-boxo-sdk": "0.3.0",
"@backpackapp-io/react-native-toast": "0.10.0",
"@expo/config-plugins": "~7.8.0",
"@gorhom/bottom-sheet": "4.5.1",
"@hookform/resolvers": "3.3.1",
"@react-native-community/datetimepicker": "7.7.0",
"@react-native-community/masked-view": "0.1.11",
"@react-native-community/netinfo": "11.1.0",
"@react-native-firebase/analytics": "20.4.0",
"@react-native-firebase/app": "20.4.0",
"@react-navigation/native": "6.1.18",
"@salam/api": "workspace:",
"@salam/ui-native": "workspace:",
"@tanstack/react-query": "4.36.1",
"@trpc/client": "10.45.0",
"@trpc/react-query": "10.45.0",
"@ts-react/form": "1.8.3",
"babel-plugin-inline-import": "3.0.0",
"clsx": "2.1.0",
"dayjs": "1.11.10",
"expo": "~50.0.19",
"expo-blur": "~12.9.2",
"expo-build-properties": "~0.11.1",
"expo-checkbox": "~2.7.0",
"expo-clipboard": "~5.0.1",
"expo-constants": "~15.4.6",
"expo-dev-client": "~3.3.12",
"expo-device": "5.9.4",
"expo-document-picker": "~11.10.1",
"expo-file-system": "~16.0.9",
"expo-image": "~1.10.6",
"expo-insights": "~0.6.1",
"expo-linking": "~6.2.2",
"expo-localization": "~14.8.4",
"expo-location": "~16.5.5",
"expo-notifications": "~0.27.8",
"expo-router": "3.4.10",
"expo-secure-store": "~12.8.1",
"expo-splash-screen": "~0.26.5",
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.4",
"expo-updates": "~0.24.13",
"expo-web-browser": "~12.8.2",
"firebase": "10.12.2",
"i18next": "23.5.1",
"lucide-react-native": "0.363.0",
"moti": "0.28.1",
"nativewind": "4.0.36",
"react": "18.2.0",
"react-hook-form": "7.47.0",
"react-i18next": "14.1.0",
"react-native": "0.73.6",
"react-native-actions-sheet-picker": "0.3.5",
"react-native-circular-progress": "1.3.9",
"react-native-confirmation-code-field": "7.3.1",
"react-native-gesture-handler": "2.14.1",
"react-native-google-places-autocomplete": "2.5.6",
"react-native-keyboard-aware-scroll-view": "0.9.5",
"react-native-keyboard-controller": "1.11.3",
"react-native-magic-modal": "5.0.2",
"react-native-maps": "1.10.0",
"react-native-mask-text": "0.14.2",
"react-native-mmkv": "2.10.2",
"react-native-modal": "13.0.1",
"react-native-popup-menu": "0.16.1",
"react-native-reanimated": "~3.6.3",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "3.30.1",
"react-native-svg": "14.1.0",
"react-native-swiper": "1.6.0",
"react-native-webview": "13.6.4",
"superjson": "2.2.1",
"tailwind-merge": "2.2.0",
"zod": "3.22.4",
"zod-i18n-map": "2.20.0",
"zustand": "4.4.3",
"react-native-moyasar-apple-pay": "0.5.0"
},
"devDependencies": {
"@babel/core": "7.23.0",
"@expo/metro-config": "^0.17.6",
"@salam/eslint-config": "workspace:",
"@salam/tailwindcss": "workspace:",
"@salam/tsconfig": "workspace:*",
"@types/react": "~18.2.60",
"tailwindcss": "3.4.1",
"typescript": "5.1.3"
},
"eslintConfig": {
"root": true,
"extends": [
"@salam/eslint-config/base",
"@salam/eslint-config/react"
]
},
"prettier": "@salam/prettier-config"
}`