Не удалось выполнить сборку: LocationAwareException: выполнить сбой для задачи: app: processDebugGoogleServices '

Я пытаюсь импортировать некоторый исходный код в Android Studio 3.0.1, но я получаю следующую ошибку: The app gradle file must have a dependency at org.gradle.tooling.internal.consume

Я не знаю, в чем проблема, тем более, что у меня есть градус 4.9

Мой файл Gradle:

buildscript {
            repositories {
                jcenter()
                google()
            }
            dependencies {
                classpath 'com.android.tools.build:gradle:3.3.0-alpha06'
                classpath 'com.google.gms:google-services:4.0.1'

                // NOTE: Do not place your application dependencies here; they belong

            // in the individual module build.gradle files
        }
    }

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
            maven { url "https://jitpack.io" }
            maven { url 'http://guardian.github.com/maven/repo-releases' }
            mavenCentral()
            google()
        }
    }

    task clean(type: Delete) {
        delete rootProject.buildDir
    }

Весь отчет об ошибке:

Ошибка: Внутренняя ошибка: org.gradle.tooling.BuildException: не удалось выполнить сборку с использованием распределения Gradle ' https://services.gradle.org/distributions/gradle-4.9-all.zip». at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform (ExceptionTransformer.java:51) в org.gradle.tooling.internal.consumer.ExceptionTransformer.transform (ExceptionTransformer.java:29) на org.gradle.tooling.internal .consumer.ResultHandlerAdapter.onFailure (ResultHandlerAdapter.java:41) на org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor $ 1 $ 1.run (DefaultAsyncConsumerActionExecutor.java:57) на org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures .onExecute (ExecutorPolicy.java:63) в org.gradle.internal.concurrent.StoppableExecutorImpl $ 1.run (StoppableExecutorImpl.java:46) в java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142) в java.util .concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:617) в java.lang.Thread.run (Thread.java:745) в org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult (BlockingResultHandler.java:46 ) в org.gradle.tooling.internal.consumer.DefaultBuildLau ncher.run (DefaultBuildLauncher.java:77) в com.android.tools.idea.gradle.project.build.invoker.GradleTasksExecutorImpl.lambda $ invokeGradleTasks $ 2 (GradleTasksExecutorImpl.java:373) на org.jetbrains.plugins.gradle.service .execution.GradleExecutionHelper.execute (GradleExecutionHelper.java:218) в com.android.tools.idea.gradle.project.build.invoker.GradleTasksExecutorImpl.invokeGradleTasks (GradleTasksExecutorImpl.java:426) в com.android.tools.idea.gradle .project.build.invoker.GradleTasksExecutorImpl.run (GradleTasksExecutorImpl.java:209) в com.intellij.openapi.progress.impl.CoreProgressManager $ TaskRunnable.run (CoreProgressManager.java:726) на com.intellij.openapi.progress.impl .CoreProgressManager.lambda $ runProcess $ 1 (CoreProgressManager.java:176) в com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun (CoreProgressManager.java:556) в com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress ( CoreProgressManager.java:501) на com.intellij.ope napi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress (ProgressManagerImpl.java:66) на com.intellij.openapi.progress.impl.CoreProgressManager.runProcess (CoreProgressManager.java:163) на com.intellij.openapi.progress.impl.ProgressManagerImpl $ 1 .run (ProgressManagerImpl.java:137) в com.intellij.openapi.application.impl.ApplicationImpl $ 2.run (ApplicationImpl.java:334) в java.util.concurrent.Executors $ RunnableAdapter.call (Executors.java:511) в java.util.concurrent.FutureTask.run (FutureTask.java:266) в java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142) в java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java : 617) at java.lang.Thread.run (Thread.java:745) Вызвано: org.gradle.internal.exceptions.LocationAwareException: Выполнение не выполнено для задачи: app: processDebugGoogleServices. at org.gradle.initialization.DefaultExceptionAnalyser.transform (DefaultExceptionAnalyser.java:74) в org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform (MultipleBuildFailuresExceptionAnalyser.java:49) в org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform (MultipleBuildFailuresExceptionAnalyser.java:39) ) at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform (StackTraceSanitizingExceptionAnalyser.java:30) в org.gradle.initialization.DefaultGradleLauncher.doBuildStages (DefaultGradleLauncher.java:149) в org.gradle.initialization.DefaultGradleLauncher.executeTasks (DefaultGradleLauncher.java: 121) на org.gradle.internal.invocation.GradleBuildController $ 1.call (GradleBuildController.java:77) на org.gradle.internal.invocation.GradleBuildController $ 1.call (GradleBuildController.java:74) на org.gradle.internal.work .DefaultWorkerLeaseService.withLocks (DefaultWorkerLeaseService.java:152) на org.gradle.internal.work.StopShieldingWork erLeaseService.withLocks (StopShieldingWorkerLeaseService.java:38) в org.gradle.internal.invocation.GradleBuildController.doBuild (GradleBuildController.java:96) на org.gradle.internal.invocation.GradleBuildController.run (GradleBuildController.java:74) в org .gradle.tooling.internal.provider.runner.BuildModelActionRunner.run (BuildModelActionRunner.java:55)

java,android,gradle,

-2

Ответов: 2


1

Измените версию Android Gradle Plugin версии 3.1.4 с использованием версии 4.4 с градиентом

Файл сборки верхнего уровня: buildscript:

classpath 'com.android.tools.build:gradle:3.1.4'

Файл gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip

0

это дает мне эту ошибку

Error:Could not find com.android.tools.build:gradle:3.1.4-alpha06.
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio2/gradle/m2repository/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.pom
    file:/C:/Program Files/Android/Android Studio2/gradle/m2repository/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.jar
    https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.pom
    https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.jar
    https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.pom
    https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.jar
    https://maven.google.com/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.pom
    https://maven.google.com/com/android/tools/build/gradle/3.1.4-alpha06/gradle-3.1.4-alpha06.jar
Required by:
    project :
<a href="openFile:C:UsersabroDesktopsource codecodecanyon-21268435-abc-call-recorderAbc Call Recorderuild.gradle">Open File</a>
Java, Android, Gradle,
Похожие вопросы
Яндекс.Метрика