我想将我的应用上传到testfairy。这始终可以正常工作,但是由于我已将Gradle更新为5.1.1发行版,因此出现以下错误:
org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.1.1-all.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:59)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:71)
at com.testfairy.plugin.intellij.BuildAndSendToTestFairy.getTestFairyTasks(BuildAndSendToTestFairy.java:171)
at com.testfairy.plugin.intellij.BuildAndSendToTestFairy.access$300(BuildAndSendToTestFairy.java:30)
at com.testfairy.plugin.intellij.BuildAndSendToTestFairy$2.run(BuildAndSendToTestFairy.java:96)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.tooling.UnsupportedVersionException: Support for clients using a tooling API version older than 3.0 was removed in Gradle 5.0. You are currently using tooling API version 2.2. You should upgrade your tooling API client to version 3.0 or later.
at org.gradle.tooling.internal.provider.DefaultConnection.unsupportedConnectionException(DefaultConnection.java:261)
at org.gradle.tooling.internal.provider.DefaultConnection.checkUnsupportedTapiVersion(DefaultConnection.java:275)
at org.gradle.tooling.internal.provider.DefaultConnection.validateAndConvert(DefaultConnection.java:253)
at org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.java:191)
at org.gradle.tooling.internal.consumer.connection.CancellableModelBuilderBackedModelProducer.produceModel(CancellableModelBuilderBackedModelProducer.java:58)
at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:56)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:82)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:76)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
... 3 more
当我仅启动gradle程序时,它可以正常工作,并且在我所有的测试手机上,它也都可以工作,那是什么问题呢?
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
buildscript {
repositories {
mavenCentral()
maven { url 'https://www.testfairy.com/maven' }
}
dependencies {
classpath 'com.testfairy.plugins.gradle:testfairy:2.+'
}
}
apply plugin: 'testfairy'
android {
testfairyConfig {
apiKey 'xxxxxx'
}
}
答案 0 :(得分:2)
UnsupportedVersionException
:在Gradle 5.0中删除了对使用版本低于3.0的工具API的客户端的支持。您当前正在使用工具API版本2.2。您应该将工具API客户端升级到3.0或更高版本。
测试精灵显然仍然使用工具API版本2.2 ...您可以提交issue。
答案 1 :(得分:1)
感谢@Sabina。我们正在与工具API 3.0版一起发布新版本。
作为旁注–我注意到您在此处放置了API密钥。它并不意味着要共享,我们已经撤消了此密钥。请转到“帐户设置”->“ API密钥”->,然后单击“重新生成”按钮。
在我们测试并发布了具有更新工具API的Gradle之后,我将发表评论。