Every time my gradle is syncing it gets errors like this. Can someone help me?
Error cause after adding firebase_ml_vision dependency.
Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
Caused by: java.lang.RuntimeException: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:packLibsflutterBuildDebug'.
Caused by: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:packLibsflutterBuildDebug'.
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:packLibsflutterBuildDebug'.
org.codehaus.groovy.runtime.metaclass.MissingMethodExecutionFailed: No signature of method: org.gradle.api.tasks.bundling.Jar.destinationDir() is applicable for argument types: (File) values: [C:\Users\37499\AndroidStudioProjects\flutter_ml_demo\build\app\intermediates\flutter\debug]
I tried changing gradle, java and firebase versions but that don't help.
Related
I am facing this error while building the application
# Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
Please help me whats the wrong
How can I resolve this error, I get this after upgrading my kotlin to 1.6.10
Is there any concrete way resolve this
Caused by: java.lang.IllegalStateException: Could not parse metadata! This should only happen if you're using Kotlin <1.1.
at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.readKotlinClassMetadata(KotlinPoetMetadata.kt:83)
at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.toImmutableKmClass(KotlinPoetMetadata.kt:113)
at com.squareup.moshi.kotlin.codegen.MoshiCachedClassInspector.toImmutableKmClass(MoshiCachedClassInspector.kt:37)
at com.squareup.moshi.kotlin.codegen.MetadataKt.targetType(metadata.kt:137)
at com.squareup.moshi.kotlin.codegen.JsonClassCodegenProcessor.adapterGenerator(JsonClassCodegenProcessor.kt:148)
at com.squareup.moshi.kotlin.codegen.JsonClassCodegenProcessor.process(JsonClassCodegenProcessor.kt:114)
at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt:90)
at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:188)
Updating Gradle from version 4.2.0 to 7.0.2. ended up in an error during minifying with R8. (Using Java 1.8)
Unfortunately, the error message is not very telling (see below).
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at Version.fakeStackEntry(Version_3.0.69.java:0)
at com.android.tools.r8.utils.w.a(SourceFile:68)
at com.android.tools.r8.utils.w.a(SourceFile:28)
at com.android.tools.r8.utils.w.a(SourceFile:27)
at com.android.tools.r8.R8.a(R8.java:29)
at com.android.tools.r8.R8.run(R8.java:3)
at com.android.builder.dexing.R8Tool.runR8(r8Tool.kt:301)
at com.android.build.gradle.internal.tasks.R8Task$Companion.shrink(R8Task.kt:592)
at com.android.build.gradle.internal.tasks.R8Task.doTaskAction(R8Task.kt:443)
at com.android.build.gradle.internal.tasks.NonIncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(BaseTask.kt:63)
at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:51)
at com.android.build.gradle.internal.tasks.NonIncrementalTask.taskAction(NonIncrementalTask.kt:94)
at jdk.internal.reflect.GeneratedMethodAccessor512.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
... 118 more
Caused by: java.lang.NullPointerException: Cannot invoke "com.android.tools.r8.graph.B.F()" because "<parameter1>" is null
Did anybody face / solve the same problem?
After migrating to Android Studio 3.4, the game now crashed. It works fine on 3.3. What does this mean?
org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
at
Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':android:transformDexWithInstantRunSlicesApkForDebug'
...
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: /Users/limtc/AndroidStudioProjects/Space War/android/build/intermediates/instant_run_split_apk_resources/debug/instantRunSplitApkResourcesDebug/out/slice_1/resources_ap
,,,
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /Users/limtc/AndroidStudioProjects/Space War/android/build/intermediates/instant_run_split_apk_resources/debug/instantRunSplitApkResourcesDebug/out/slice_1/resources_ap
...
Caused by: java.io.FileNotFoundException: /Users/limtc/AndroidStudioProjects/Space War/android/build/intermediates/instant_run_split_apk_resources/debug/instantRunSplitApkResourcesDebug/out/slice_1/resources_ap
...
After switching off instant run, I can now deploy to phone! But trying to generate bundle I now have:
org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
...
Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':android:lintVitalRelease'
...
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':android:lintClassPath'.
...
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download groovy-all.jar
Maybe now something goes offline? Thanks!
Based on the messages:
java.io.FileNotFoundException: /.../instant_run_split_apk_resources
I'd say, try disabling Instant Run.
I am trying to import an existing project (sample project by apigee) into Android Studio 3.0.1. I get the following error:
Gradle sync failed: No signature of method: org.gradle.internal.classloader.FilteringClassLoader.allowPackage() is applicable for argument types: (java.lang.String) values: [org.apache.tools.zip]
Note: I did change the graddle-wrapper.properties file entry from distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-all.zip to distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip as I was facing an earlier error.
The Gradle version in Project Structure is also 4.1.
Here are some excerpts from the logs:
2017-11-21 19:45:01,324 [se-915-b01] INFO - tor.impl.FileEditorManagerImpl - Project opening took 875 ms
2017-11-21 19:45:02,350 [ thread 20] INFO - .project.GradleProjectResolver - Gradle project resolve error
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.1-all.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
....
Caused by: org.gradle.internal.exceptions.LocationAwareException: Build file 'C:\apigee-android-sdk-2.0.14\source\build.gradle' line: 2
A problem occurred evaluating root project 'apigee-android'.
at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:74)
......
Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'apigee-android'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
....
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [class 'com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin']
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:150)
....
Caused by: groovy.lang.MissingMethodException: No signature of method: org.gradle.internal.classloader.FilteringClassLoader.allowPackage() is applicable for argument types: (java.lang.String) values: [org.apache.tools.zip]
at com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.apply(ShadowBasePlugin.groovy:36)
......
2017-11-21 19:45:02,361 [ thread 20] WARN - nal.AbstractExternalSystemTask - No signature of method: org.gradle.internal.classloader.FilteringClassLoader.allowPackage() is applicable for argument types: (java.lang.String) values: [org.apache.tools.zip]
com.intellij.openapi.externalSystem.model.LocationAwareExternalSystemException: No signature of method: org.gradle.internal.classloader.FilteringClassLoader.allowPackage() is applicable for argument types: (java.lang.String) values: [org.apache.tools.zip]
at com.android.tools.idea.gradle.project.sync.idea.ProjectImportErrorHandler.getUserFriendlyError(ProjectImportErrorHandler.java:81)
......
Caused by: groovy.lang.MissingMethodException: No signature of method: org.gradle.internal.classloader.FilteringClassLoader.allowPackage() is applicable for argument types: (java.lang.String) values: [org.apache.tools.zip]
at com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.apply(ShadowBasePlugin.groovy:36)