`yarn android` fails on new app
See original GitHub issueyarn android
fails after creating a branch new ‘app’.
Steps to reproduce
npx ignite-cli new PizzaApp
cd PizzaApp/
yarn android
Output from yarn android
:
yarn run v1.22.17
$ react-native run-android
warn Package expo-modules-core has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios" must be of type object
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1276 file(s) to forward-jetify. Using 16 workers...
info Starting JS server...
info Installing the app...
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/tmp/PizzaApp/node_modules/expo/android/build.gradle' line: 3
* What went wrong:
A problem occurred evaluating project ':expo'.
> Plugin with id 'maven' not found.
* 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'.
> com.android.builder.errors.EvalIssueException: 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 8s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/tmp/PizzaApp/node_modules/expo/android/build.gradle' line: 3
* What went wrong:
A problem occurred evaluating project ':expo'.
> Plugin with id 'maven' not found.
* 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'.
> com.android.builder.errors.EvalIssueException: 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 8s
at makeError (/tmp/PizzaApp/node_modules/execa/index.js:174:9)
at /tmp/PizzaApp/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/tmp/PizzaApp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/tmp/PizzaApp/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npx ignite-cli doctor
results:
System
platform linux
arch x64
cpu 16 cores AMD Ryzen 7 PRO 4750U with Radeon Graphics
directory PizzaApp /tmp/PizzaApp
JavaScript (and globally-installed packages)
node 14.19.0 /usr/bin/node
npm 6.14.16 /usr/bin/npm
corepack 0.10.0
npm 6.14.16
yarn 1.22.17 /usr/bin/yarn
agendash 2.1.1
browserify-breakdown 1.0.4
depcheck 1.4.0
disc 1.3.3
localtunnel 2.0.1
m 1.6.0
neovim 4.10.0
nodemon 2.0.7
source-map-explorer 2.5.2
tldr 3.3.7
web-ext 5.5.0
wscat 4.0.1
wtfnode 0.8.4
pnpm - not installed
Ignite
ignite-cli 7.10.2 /home/asheboy/.npm/_npx/265171/bin/ignite
ignite src build /home/asheboy/.npm/_npx/265171/lib/node_modules/ignite-cli/build
Android
java 11.0.13 /usr/bin/java
android home - /home/asheboy/Android/Sdk
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Why when I want to run an Android yarn error like this?
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed D:\xampp\ ...
Read more >I am unable to run android app. When I run yarn android I am ...
I am unable to run android app. When I run yarn android I am getting this error. FAILURE: Build failed with an exception....
Read more >Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >React Native for Android development on Windows
This guide will help you to get started using React Native on Windows to create a cross-platform app that will work on Android...
Read more >npx react-native run-android build failed - You.com
What went wrong: A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest'). File 'E:\pjh\Dev\ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like we need to update anything expo-related in our dependencies.
It should work after that.
I’ll do a PR to Ignite to fix this goign forward.
@b-r-s Can you file a new issue? You can reference this one (#1887) if you feel it is related.