could not resolve all task dependencies for configuration and excution failed for task > java.util.NoSuchElementException( no error message) - dynamic

recently i add dynamic delivery module(dynamic feature) to the app, and facing this error first:
(1) could not determine the dependencies of task ':project:compileDebugjavawithJavac'
could not resolve all task dependencies for configuration ': project:debugCompileClasspath'
could not resolve project :app
required by
Project : project
cannot choose between the following variants of project: app:
-devDebugAndroidTestCompile
-devDebugAndroidTestRuntime
-...
after searching the google, so I changed the module part implementation app part to be :
implementation project(path:':app', configuration:'default')
but then these two errors come out :
(2)
1:
task failed with an exception
*what went wrong:
execution failed for task ':project:databindingexportfeatureInfoDebug'
java.util.NoSuchElementException (no error message)
2:
task failed with an exception
*what went wrong:
execution failed for task ':project:processDebugManifest'
java.util.NoSuchElementException (no error message)
How to fix these issues? thanks

Related

RN-0.70.6 error- Execution failed for task ':app:processDebugResources'

Just upgraded the RN-0.63.3 to latest RN-0.70.6
giving Execution failed for task ':app:processDebugResources'. error with
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
Android resource linking failed
com.APPNAME.app-mergeDebugResources-33:/values/values.xml:913: error: resource drawable/rn_edit_text_material (aka com.pushthivardhan.foods.consumer:drawable/rn_edit_text_material) not found.
tried the recommended changes from stackoverflow(previous solution) , but didn't worked.

Gradle annotation processor order (Android)

I'm writing a library based on code generation.
This library generating dagger's module via annotations. How do I run my annotation processor before dagger's code generation?
Now it crashes on build because dagger trying to build the component before modules was generated.
Error:
.ktC:\Users\syncended\AndroidStudioProjects\Daggerblade\app\build\tmp\kapt3\stubs\debug\dev\syncended\daggerblade\AppComponent.java:6: error: cannot find symbol
#dagger.Component(modules = {BookModule.class})
^
symbol: class BookModuleC:\Users\syncended\AndroidStudioProjects\Daggerblade\app\build\tmp\kapt3\stubs\debug\dev\syncended\daggerblade\AppComponent.java:7: error: [ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
public abstract interface AppComponent {
^Attempt to reopen a file for path C:\Users\syncended\AndroidStudioProjects\Daggerblade\app\build\generated\source\kapt\debug\dev\syncended\blade\BookModule.kt
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
* Try:

Could not find support-v4.aar (com.android.support:support-v4:25.2.0)

i am running sample application...... I am using this module..... But i am getting error like this...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-google-analytics-bridge'.
> Could not find support-v4.aar (com.android.support:support-v4:25.2.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/25.2.0/support-v4-25.2.0.aar
My module version is :"react-native-google-analytics-bridge": "^5.2.2"
Here is the screenshot:
In such cases of failure, sometimes the module linking doesn't go well.Please try to link the module manually as described in the link :https://github.com/idehub/react-native-google-analytics-bridge/wiki/Manual-installation
and/or try replace "support-v4:25.2.0" with compile 'com.android.support:support-v13:23.1.1'.
Location: Android/App/build.gradle

Multi-dimension Android project won't build - ProcessInfoBuilder$JavaProcessInfoImpl.getExecutable throws UnsupportedOperationException

i've got a rather large, multi-dimension Android app that i'm trying to upgrade from Dagger 1 to Dagger 2. i've made all the code changes i believe need to be made to support the upgrade, but now when i build the app i'm getting the following exception (during the transformClassesWithMultidexlistForXXX task):
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForMyFlavorAndDimensionDebug'.
> java.lang.UnsupportedOperationException (no error message)
* Try:
Run with --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithMultidexlistForMyFlavorAndDimensionDebug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
...(snip)...
Caused by: java.lang.UnsupportedOperationException
at com.android.ide.common.process.ProcessInfoBuilder$JavaProcessInfoImpl.getExecutable(ProcessInfoBuilder.java:349)
at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:49)
at com.android.builder.core.AndroidBuilder.createMainDexList(AndroidBuilder.java:1426)
...(snip)...
... 68 more
BUILD FAILED
Total time: 5 mins 5.179 secs
Stopped 0 compiler daemon(s).
digging into the source, ProcessBuilder.JavaProcessInfoImpl.getExecutable() simply throws an UnsupportedOperationException.
i'm using version 2.2.3 of the Android Gradle plug-in.
has anyone else run into this issue? have i done something in error to lead me down this path?
any thoughts or suggestions would be greatly appreciated!
*********************** UPDATE ***********************
i managed my way around this issue by downgrading from Dagger 2.8 —> 2.7.

transformClassesWithJarMergingForDebug FAILED issue with Gradle

I am fairly new at Android development and have been struggling to get a working build of an app I am working on.
I receive the following error after a build with Gradle:
:app:transformClassesWithJarMergingForDebug FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:
android/support/v4/print/PrintHelper$1.class
I (think) I narrowed the issue down to multiple libraries using the same 'support-v4' module, but I'm not sure. I can provide more details. Thank you.
I fixed this by deleting .jar files that were duplicates.