当我从Android Studio中运行Android版本时,它绝对会生成文件。
当我运行从AppCenter签入github的同一源代码时,它在Gradle上失败并出现以下错误。
有人知道为什么会发生这种情况吗?
================================================ =============================任务:Gradle描述:使用Gradle包装器进行构建 脚本版本:1.128.0作者:微软公司 帮助:More Information ================================================== ============================ SYSTEMVSSCONNECTION存在true [命令] /Users/vsts/agent/2.148.1/work/1/s/android/gradlew -DMOBILECENTER_BUILD_VERSION = 17 -DAPPCENTER_BUILD_VERSION = 17 -p android clean:app:assembleDevKernelDebug启动Gradle守护程序 (后续构建会更快)Gradle 4.4与并行执行 按需配置是一个孵化功能。下载 https://jcenter.bintray.com/de/undercouch/gradle-download-task/2.0.0/gradle-download-task-2.0.0.pom 下载 https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom 解决了:classpath中的com.android.tools.build:gradle:3.1.4 :.classpath中的com.google.gms:google-services:3.2.1已解决 de.undercouch:gradle-download-task:2.0.0 in:classpath下载 https://jcenter.bintray.com/de/undercouch/gradle-download-task/2.0.0/gradle-download-task-2.0.0.jar 下载 https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar 位于的Project android:不是Android应用程序项目或构建版本 尚未设置为覆盖。正在跳过...已解决 com.android.tools.build:gradle:3.2.1 in :@ react-native-community_netinfo:classpath项目 @ react-native-community_netinfo的@ react-native-community_netinfo是 没有将Android应用程序项目或构建版本设置为 覆盖。正在跳过...下载 https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml 下载 https://maven.fabric.io/public/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.pom :app:classpath中已解决的io.fabric.tools:gradle:1.28.1下载 https://maven.fabric.io/public/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.jar 进入时找不到google-services.json [src / prod / min / sdk / dev / kernel / debug,src / prod / min / sdk / dev / debug, src / prod / min / sdk / dev / kernel,src / prod / min / sdk / dev / kernelDebug, src / prod / min / sdk / debug,src / prod / min / sdk / dev, src / prod / min / sdk / devDebug,src / prod / min / debug,src / prod / min / sdk, src / prod / min / sdkDebug,src / prodMinSdkDevKernel / debug, src / debug / prodMinSdkDevKernel,src / prod / debug,src / prod / min, src / prod / minDebug,src / prodMinSdkDevKernel,src / debug, src / prodMinSdkDevKernelDebug,src / prod,src / prodDebug] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / prod / min / sdk / dev / kernel / release,src / prod / min / sdk / dev / release, src / prod / min / sdk / dev / kernel,src / prod / min / sdk / dev / kernelRelease, src / prod / min / sdk / release,src / prod / min / sdk / dev, src / prod / min / sdk / dev发布,src / prod / min / release,src / prod / min / sdk, src / prod / min / sdkRelease,src / prodMinSdkDevKernel / release, src / release / prodMinSdkDevKernel,src / prod / release,src / prod / min, src / prod / minRelease,src / prodMinSdkDevKernel,src / release, src / prodMinSdkDevKernelRelease,src / prod,src / prodRelease] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / prod / min / sdk / prod / kernel / debug,src / prod / min / sdk / prod / debug, src / prod / min / sdk / prod / kernel,src / prod / min / sdk / prod / kernelDebug, src / prod / min / sdk / debug,src / prod / min / sdk / prod, src / prod / min / sdk / prodDebug,src / prod / min / debug,src / prod / min / sdk, src / prod / min / sdkDebug,src / prodMinSdkProdKernel / debug, src / debug / prodMinSdkProdKernel,src / prod / debug,src / prod / min, src / prod / minDebug,src / prodMinSdkProdKernel,src / debug, src / prodMinSdkProdKernelDebug,src / prod,src / prodDebug] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / prod / min / sdk / prod /内核/发行版,src / prod / min / sdk / prod /发行版, src / prod / min / sdk / prod / kernel,src / prod / min / sdk / prod / kernelRelease, src / prod / min / sdk / release,src / prod / min / sdk / prod, src / prod / min / sdk / prodRelease,src / prod / min / release,src / prod / min / sdk, src / prod / min / sdkRelease,src / prodMinSdkProdKernel / release, src / release / prodMinSdkProdKernel,src / prod / release,src / prod / min, src / prod / minRelease,src / prodMinSdkProdKernel,src / release, src / prodMinSdkProdKernelRelease,src / prod,src / prodRelease] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / dev / min / sdk / dev / kernel / debug,src / dev / min / sdk / dev / debug, src / dev / min / sdk / dev / kernel,src / dev / min / sdk / dev / kernelDebug, src / dev / min / sdk / debug,src / dev / min / sdk / dev,src / dev / min / sdk / devDebug, src / dev / min / debug,src / dev / min / sdk,src / dev / min / sdkDebug, src / devMinSdkDevKernel / debug,src / debug / devMinSdkDevKernel, src / dev / debug,src / dev / min,src / dev / minDebug,src / devMinSdkDevKernel, src / debug,src / devMinSdkDevKernelDebug,src / dev,src / devDebug] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / dev / min / sdk / dev / kernel / release,src / dev / min / sdk / dev / release, src / dev / min / sdk / dev / kernel,src / dev / min / sdk / dev / kernelRelease, src / dev / min / sdk / release,src / dev / min / sdk / dev, src / dev / min / sdk / dev发行,src / dev / min / release,src / dev / min / sdk, src / dev / min / sdkRelease,src / devMinSdkDevKernel / release, src / release / devMinSdkDevKernel,src / dev / release,src / dev / min, src / dev / minRelease,src / devMinSdkDevKernel,src / release, src / devMinSdkDevKernelRelease,src / dev,src / devRelease] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / dev / min / sdk / prod / kernel / debug,src / dev / min / sdk / prod / debug, src / dev / min / sdk / prod / kernel,src / dev / min / sdk / prod / kernelDebug, src / dev / min / sdk / debug,src / dev / min / sdk / prod, src / dev / min / sdk / prodDebug,src / dev / min / debug,src / dev / min / sdk, src / dev / min / sdkDebug,src / devMinSdkProdKernel / debug, src / debug / devMinSdkProdKernel,src / dev / debug,src / dev / min, src / dev / minDebug,src / devMinSdkProdKernel,src / debug, src / devMinSdkProdKernelDebug,src / dev,src / devDebug] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)找不到 边看边google-services.json [src / dev / min / sdk / prod / kernel / release,src / dev / min / sdk / prod / release, src / dev / min / sdk / prod / kernel,src / dev / min / sdk / prod / kernelRelease, src / dev / min / sdk / release,src / dev / min / sdk / prod, src / dev / min / sdk / prodRelease,src / dev / min / release,src / dev / min / sdk, src / dev / min / sdkRelease,src / devMinSdkProdKernel / release, src / release / devMinSdkProdKernel,src / dev / release,src / dev / min, src / dev / minRelease,src / devMinSdkProdKernel,src / release, src / devMinSdkProdKernelRelease,src / dev,src / devRelease] registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)项目appcenter位于 :appcenter既不是Android应用程序项目,又不是构建版本 被设置为覆盖。正在跳过...项目appcenter-analytics位于 :appcenter-analytics既不是Android应用项目也不是构建版本 尚未设置为覆盖。跳过...项目appcenter崩溃于 :appcenter-crashes既不是Android应用项目也不是构建版本 尚未设置为覆盖。正在跳过...已解决 com.android.tools.build:gradle:3.1.4 in :react-native-vector-icons:classpath项目 :native-native-vector-icons上的react-native-vector-icons要么不是 Android应用项目或构建版本尚未设置为覆盖。 正在跳过...警告:指定的Android SDK Build Tools版本 (26.0.3)被忽略,因为它低于最低支持的版本 (27.0.3)适用于Android Gradle插件3.1.4。 Android SDK构建工具 将使用27.0.3。要取消显示此警告,请分别从build.gradle文件中删除“ buildToolsVersion '26 .0.3'” 版本的Android Gradle插件现在具有默认版本的 构建工具。
失败:构建失败,并出现异常。
出了什么问题:在项目':app'中找不到任务'assembleDevKernelDebug'。
尝试:运行gradlew任务以获取可用任务的列表。使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整的见解。
- 获得更多帮助
在42秒内失败:错误: /Users/vsts/agent/2.148.1/work/1/s/android/gradlew失败,返回 代码:1 在ChildProcess。 (/Users/vsts/agent/2.148.1/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/1.128.0/node_modules/vsts-task-lib/toolrunner.js:569:30) 在emitTwo(events.js:106:13) 在ChildProcess.emit(events.js:191:7) 在也许关闭(internal / child_process.js:886:16) 在套接字。 (内部/child_process.js:342:11) 在emitOne(events.js:96:13) 在Socket.emit(events.js:188:7) 在Pipe._handle.close [作为_onclose](net.js:497:12)
[错误]错误:/Users/vsts/agent/2.148.1/work/1/s/android/gradlew失败,返回码:1
答案 0 :(得分:0)
您可能有无效的构建变体。转到您的build.gradle
,它应该看起来像这样。
flavorDimensions 'remoteKernel'
productFlavors {
devKernel {
dimension 'remoteKernel'
}
prodKernel {
dimension 'remoteKernel'
}
}
这将在下一届博览会中再次更改。
答案 1 :(得分:-1)
今天早上我开始遇到与罗伯特·汉纳威(Robert Hanaway)相同的错误。如果我在macOS代理上运行管道,但失败并显示502错误响应。但是,如果我使用hostedvs2017代理运行它,则效果很好。