Reputation: 1
I'm really confused at AppCenter Build's behavior. I successfully created a GitHub Action to build an Android project but when I point AppCenter to that repository, I get the following:
Project AndroidDummy1 at : is either no Android app project or build version has not been set to override. Skipping...
...where "AndroidDummy1" is the test project I'm working with, a very simple one-screen app just to debug and test the AppCenter build process. More of the log looks like this:
Welcome to Gradle 8.2!
Here are the highlights of this release:
- Kotlin DSL: new reference documentation, assignment syntax by default
- Kotlin DSL is now the default with Gradle init
- Improved suggestions to resolve errors in console output
For more details see https://docs.gradle.org/8.2/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
Gradle 8.2
> Configure project :
Resolved com.android.application:com.android.application.gradle.plugin:8.2.0 in detachedConfiguration1
Resolved org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin:1.9.0 in detachedConfiguration2
Resolved com.android.application:com.android.application.gradle.plugin:8.2.0 in :classpath
Resolved org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin:1.9.0 in :classpath
Project AndroidDummy1 at : is either no Android app project or build version has not been set to override. Skipping...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'AndroidDummy1'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:8.2.0.
Required by:
project : > com.android.application:com.android.application.gradle.plugin:8.2.0
> No matching variant of com.android.tools.build:gradle:8.2.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.2' but:
- Variant 'apiElements' capability com.android.tools.build:gradle:8.2.0 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
- Variant 'javadocElements' capability com.android.tools.build:gradle:8.2.0 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
- Variant 'runtimeElements' capability com.android.tools.build:gradle:8.2.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
- Variant 'sourcesElements' capability com.android.tools.build:gradle:8.2.0 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
* 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 21s
Error: /Users/runner/work/1/s/gradlew failed with return code: 1
at ChildProcess.<anonymous> (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/1.128.0/node_modules/vsts-task-lib/toolrunner.js:569:30)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket.<anonymous> (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:509:12)
##[error]Error: /Users/runner/work/1/s/gradlew failed with return code: 1
##[section]Finishing: Gradle Task
I tried to find the YAML that I assume AppCenter generates, but the closest I could come to seeing what AppCenter fired off was when I looked at the configuration options, and opened the "Export Branch Configuration" window, and looked in the "YAML export configuration" section. I see all the steps that AppCenter uses, but it appears that's a one-way display - I can't alter that script to tweak to find a working solution. And in the "Advanced Build Configuration" section above it, it says this:
"Azure Pipeline supports more advanced build configurations than App Center Build. If your application has complex repository structure or requires customizations using a framework that’s not supported by App Center, try setting up Azure Pipelines that may better serve your application."
And then it goes on for a little bit.
Does this mean I have to migrate to Azure Pipelines in order to fire off an AppCenter build successfully? I don't understand why there's apparently a null reference in the error message (at the colon): "Project AndroidDummy1 at : is"
What am I missing here?
Upvotes: 0
Views: 348
Reputation: 13944
Based on the statement in the documentation "Building Java apps for Android" and "Gradle build after JCenter shutdown", the recent shutdown of JCenter may cause the similar Gradle Task failures.
If you use JCenter and Bintray resources in your AppCenter Android builds, the Gradle Task failures in your build could be related to this.
Upvotes: 0