AppCenter内部版本:项目{project-name}位于:不是Android应用项目,或者内部版本未设置为覆盖,正在跳过

xe55xuns  于 9个月前  发布在  Android
关注(0)|答案(1)|浏览(97)

我对AppCenter Build的行为感到困惑。我成功地创建了一个GitHub Action来构建一个Android项目,但当我将AppCenter指向该存储库时,我得到了以下内容:
第一个月
.其中“AndroidDummy 1”是我正在使用的测试项目,一个非常简单的单屏幕应用程序,只是为了调试和测试AppCenter构建过程。更多的日志看起来像这样:

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

字符串
我试图找到我假设AppCenter生成的YAML,但最接近AppCenter启动的是当我查看配置选项时,打开“导出分支配置”窗口,并查看“YAML导出配置”部分。我看到AppCenter使用的所有步骤,但它似乎是一个单向显示-我不能改变该脚本来调整找到一个工作的解决方案。在上面的“高级构建配置”部分,它说:
Azure Pipeline支持比App Center Build更高级的生成配置。如果你的应用程序具有复杂的存储库结构或需要使用App Center不支持的框架进行自定义,请尝试设置可能更好地为你的应用程序服务的Azure Pipeline。
然后它会继续一小段。
这是否意味着我必须迁移到Azure Pipelines才能成功启动AppCenter构建?我不明白为什么错误消息(冒号处)中明显存在空引用:“Project AndroidDummy 1 at:is”
我错过了什么?

kwvwclae

kwvwclae1#

根据文档“Building Java apps for Android“和“Gradle build after JCenter shutdown“中的声明,最近关闭JCenter可能会导致类似的Gradle任务失败。


的数据
如果您在AppCenter Android构建中使用JCenter和Bintray资源,则构建中的Gradle任务失败可能与此相关。

相关问题