Reputation: 1559
Android, Azure Devops geting error while run pipeline ##[error]Error: The process '/Users/runner/work/1/s/gradlew' failed with exit code 1
At locale system everything working apk generated but when run pipeline at azure devops it showing the error
FAILURE: Build failed with an exception.
* Where: Build file '/Users/runner/work/1/s/app/build.gradle' line: 2
* What went wrong: An exception occurred applying plugin request [id:
'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
I'm already using Java 11
I searched for same but not get any solution.
Upvotes: 8
Views: 11381
Reputation: 31
I had a same issue and I solved it:
- task: JavaToolInstaller@0
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
Upvotes: 2
Reputation: 1559
I have solved the issue by adding task for maven in azure-pipelines.yml
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
mavenVersionOption: 'Default'
mavenOptions: '-Xmx3072m'
Hope this will helpful for other...
Upvotes: 8