You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build the Android apk but it always fails with "Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.". I ran npx expo-doctor, it finishes with "Didn't find any issues with the project!".
I checked all dependencies etc. but can find the error.
Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-8.3-all.zip
10%
20%.
30%.
40%.
50%
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 8.3!
Here are the highlights of this release:
What went wrong:
A problem occurred evaluating project ':expo-modules-core'.
Cannot invoke method replace() on null object
Try:
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.
==============================================================================
2:
Task failed with an exception.
What went wrong:
A problem occurred configuring project ':expo'.
compileSdkVersion is not specified. Please add it to build.gradle
Try:
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.
==============================================================================
BUILD FAILED in 2m 5s
5 actionable tasks: 5 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Reproducible demo or steps to reproduce from a blank project
Build/Submit details page URL
No response
Summary
I am trying to build the Android apk but it always fails with "Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.". I ran npx expo-doctor, it finishes with "Didn't find any issues with the project!".
I checked all dependencies etc. but can find the error.
Any ideas?
Thank you guys
Managed or bare?
Managed
Environment
expo-env-info 1.2.0 environment info:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.12.1 - C:\Program Files\nodejs\node.EXE
npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 30, 31, 34
Build Tools: 30.0.3, 31.0.0, 32.0.0, 33.0.0, 34.0.0
System Images: android-30 | Intel x86_64 Atom, android-31 | Intel x86_64 Atom, android-33 | Intel x86_64 Atom, android-33 | Google Play Intel x86_64 Atom, android-34 | Google APIs Intel x86_64 Atom
IDEs:
Android Studio: AI-232.10300.40.2321.11567975
npmPackages:
expo: ^50.0.0 => 50.0.15
react: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
Expo Workflow: bare
Error output
Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-8.3-all.zip
10%
20%.
30%.
40%.
50%
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 8.3!
Here are the highlights of this release:
For more details see https://docs.gradle.org/8.3/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.3/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
Build file '/home/expo/workingdir/build/node_modules/expo-modules-core/android/build.gradle' line: 372
A problem occurred evaluating project ':expo-modules-core'.
A problem occurred configuring project ':expo'.
Reproducible demo or steps to reproduce from a blank project
eas build -p android --profile preview
eas.json
{
"cli": {
"version": ">= 7.8.1"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
"production": {}
}
}
The text was updated successfully, but these errors were encountered: