Ive used the following YAML config:
Gradle
Build your Java project and run tests with Gradle using a Gradle wrapper script.
Add steps that analyze code, save build artifacts, deploy, and more:
https://learn.microsoft.com/azure/devops/pipelines/languages/java
trigger:
develop
pool:
vmImage: 'macOS-10.14'
steps:
task: Gradle#2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'build'
I see the issue mentioned below:
Task :app:compileLiasDevReleaseSources
Task :app:lintVitalLiasDevRelease SKIPPED
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Task :app:extractLiasDevReleaseNativeSymbolTables FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:extractLiasDevReleaseNativeSymbolTables'.
NDK is not installed
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
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.1.1/userguide/command_line_interface.html#sec:command_line_warnings
213 actionable tasks: 213 executed
in 7m 37s
Error: The process '/Users/runner/work/1/s/gradlew' failed with exit code 1
at ExecState._setResult (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.191.0/node_modules/azure-pipelines-task-lib/toolrunner.js:944:25)
at ExecState.CheckComplete (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.191.0/node_modules/azure-pipelines-task-lib/toolrunner.js:927:18)
at ChildProcess.<anonymous> (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.191.0/node_modules/azure-pipelines-task-lib/toolrunner.js:840:19)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Socket.stream.socket.on (internal/child_process.js:389:11)
at Socket.emit (events.js:198:13)
at Pipe._handle.close (net.js:607:12)
[error]Error: The process '/Users/runner/work/1/s/gradlew' failed with exit code 1
Finishing: Gradle
Related
When I normally running my react-native from visual code in Android Virtual Device (Emulator) via terminal with npx react-native run android, suddenly I'm facing this error
1. info Running jetifier to migrate libraries to AndroidX. You can
disable it using "--no-jetifier" flag. Jetifier found 954 file(s) to
forward-jetify. Using 8 workers... info Starting JS server... info
Launching emulator... error Failed to launch emulator. Reason: Could
not start emulator within 30 seconds.. warn Please launch an
emulator manually or connect a device. Otherwise app may fail to
launch. info Installing the app...
> Configure project :react-native-firebase_app :react-native-firebase_app package.json found at
C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_app:firebase.bom using default value: 28.1.0
:react-native-firebase_app:play.play-services-auth using default
value: 19.0.0 :react-native-firebase_app package.json found at
C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_app:version set from package.json: 12.1.0
(12,1,0 - 12001000) :react-native-firebase_app:android.compileSdk
using custom value: 29 :react-native-firebase_app:android.targetSdk
using custom value: 29 :react-native-firebase_app:android.minSdk
using custom value: 21
:react-native-firebase_app:reactNativeAndroidDir
C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\react-native\android
> Task :app:installDebug FAILED Skipping device 'emulator-5554' (emulator-5554): Device is OFFLINE. 64 actionable tasks: 2 executed,
62 up-to-date
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No online devices 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 16s
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.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No online devices 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 16s
at makeError (C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\execa\index.js:174:9)
at C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async runOnAllDevices (C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\admin\Desktop\TheOriginalsAgency\Stage-pre-emcauche\MilinusApp\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.
I don't know if you already fixed this but I just solved it!
I added more space to the Android Virtual Device.
You have to:
Edit the device or create a new one
On the ¨Verify Configuration¨ page, click on ¨Show Advanced Settings¨
Scroll down to ¨Memory and Storage¨
Change the Internal Storage MB amount
Initially the device that I've created had 2048MB and so I changed it to 6000MB but that wasn't enough so I finally put 10000MB of Internal Storage and with that amount I didn't get this error anymore.
Hope it works, good luck!
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
> Connection reset
Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)
> Could not get resource 'https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar'.
> Connection reset
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 22m 42s
Exception: Gradle task assembleDebug failed with exit code 1
My React Native used to run fine with 0.61.2 with Nodej 10.13. There is an error after upgrading to nodejs 12.13.0 when react-native run-android. Here is the error:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1461 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Script 'C:\D\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 182
* What went wrong:
A problem occurred evaluating script.
> Text must not be null or empty
* 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 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Script 'C:\D\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 182
* What went wrong:
A problem occurred evaluating script.
> Text must not be null or empty
* 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 3s
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli\build\index.js:164:9)
./gradlew clean failed as well. What is wrong with the upgrade? Shall I roll back to nodejs 10.13?
Executing tasks: [clean, :app:assembleDebug]
Configure project :app
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild
Task :app:compileDebugAidl
Task :app:compileDebugRenderscript
Task :app:checkDebugManifest
Task :app:generateDebugBuildConfig
Task :app:prepareLintJar UP-TO-DATE
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:processDebugGoogleServices
Parsing json file: D:\ANDROID APP SOURCE CODE\HD WALLPAPERS\codecanyon-7054658-hd-wallpaper-with-material-design\HD Wallpaper Package\Source Code\HDWallpaperNew\app\google-services.json
D:\ANDROID APP SOURCE CODE\HD WALLPAPERS\codecanyon-7054658-hd-wallpaper-with-material-design\HD Wallpaper Package\Source Code\HDWallpaperNew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-sw600dp-v13\values-sw600dp-v13.xml: error: file not found.
Task :app:mergeDebugResources FAILED
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
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
12 actionable tasks: 10 executed, 2 up-to-date
I did not find Exact issue I already try previous answer of others but non of any solve my issue !
make sure that you have google-services.json in your android\app folder.
In circle-ci 1.0 the config file seemed to specify dependencies. I noticed that in circle-ci 2.0 that this concept is gone to some degree.
Sooo I tried the following:
steps:
- checkout
- run:
name: Install Sauce Connect
command: |
wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz
tar -xzf sc-latest-linux.tar.gz
...
- run: yarn integration
Seems like this didn't quite pan out. I get the following result in circle-ci's console:
#!/bin/bash -eo pipefail
yarn run integration
yarn run v0.24.6
$ node_modules/.bin/wdio test/wdio.conf.js
A service failed in the 'onPrepare' hook
Error: Could not start Sauce Connect. Exit code 1 signal: null
at ChildProcess.<anonymous> (/home/circleci/repo/node_modules/sauce-connect-launcher/lib/sauce-connect-launcher.js:559:12)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
Continue...
ERROR: connect ECONNREFUSED 127.0.0.1:4445
chrome
Error
ERROR: connect ECONNREFUSED 127.0.0.1:4445
chrome
Error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1
I'm using wdio, with the sauce and mocha plugins. It works locally. Ideas? Any guides that exist anywhere for this? Google didn't produce any answers for circle-ci 2.0 and saucelabs integrations.