Reputation: 135
I have an application developed with expo 49 and typescript 5.1.3. And I need to build it to upload the app to Google Play.
In the vs code terminal I entered the commands 1), 2), 3) and 4).
1)npm install -g eas-cli
2)eas login
3)eas build:configure
โ Which platforms would you like to configure for EAS Build? ยป Android
โ Generated eas.json. Learn more: https://docs.expo.dev/build-reference/eas-json/
๐ Your project is ready to build.
Run eas build when you are ready to create your first build.
Once the build is completed, run eas submit to upload the app to app stores.
Learn more about other capabilities of EAS Build: https://docs.expo.dev/build/introduction
4)eas build --platform android
Loaded "env" configuration for the "production" profile: no environment variables specified. Learn more: https://docs.expo.dev/build-reference/variables/
โ Using remote Android credentials (Expo server)
โ Using Keystore from configuration: Build Credentials wdhdOKG1L- (default) Compressing project files and uploading to EAS Build. Learn more: https://expo.fyi/eas-build-archive
โ Uploaded to EAS 1s
Waiting for build to complete. You can press Ctrl+C to exit.
โ Build failed ๐ค Android build failed: Gradle build failed with unknown error. On the expo website I received the errors below.
In expo.dev I received the error below,
Running 'gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-8.0.1-all.zip
10%
20%
30
%.
40%
50%.
60%
70%.
80%
90%
100%
Welcome to Gradle 8.0.1!
Here are the highlights of this release:
- Improvements to the Kotlin DSL
- Fine-grained parallelism from the first build with configuration cache
- Configurable Gradle user home cache cleanup
For more details see https://docs.gradle.org/8.0.1/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/8.0.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Task :gradle-plugin:pluginDescriptors
> Task :gradle-plugin:processResources
> Task :gradle-plugin:compileKotlin
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:classes
> Task :gradle-plugin:jar
> Task :gradle-plugin:inspectClassesForKotlinIC
FAILURE: Build completed with 2 failures.
1:
Task failed with an exception.
-----------
* Where:
Build file '/home/expo/workingdir/build/node_modules/expo-error-recovery/android/build.gradle' line: 40
* What went wrong:
A problem occurred evaluating project ':expo-error-recovery'.
>
Could not set unknown property 'classifier' for task ':expo-error-recovery:androidSourcesJar' of type org.gradle.api.tasks.bundling.Jar.
* 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.
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.
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
How to resolve?
Upvotes: 1
Views: 364
Reputation: 1
just check in your project does it had android folder, if not then do some research and create one, or create this project again to get the android folder - by again creating expo init project
Upvotes: 0