0

Descrip : I created a jenkins job to integrate jenkins with Android studio for generating artifacts,

While building the project in Android studio, The build is successfull..

But When i build the same project via jenkins, Im getting the below error..!

    Starting a Gradle Daemon (subsequent builds will be faster)

> Task :clean UP-TO-DATE
> Task :app:clean UP-TO-DATE

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:javaPreCompileDebug

> Task :app:generateDebugResValues
> Task :app:generateDebugResources

> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :app:processDebugManifest

> Task :app:mergeDebugResources

> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform navigation-ui-2.3.0.aar (androidx.navigation:navigation-ui:2.3.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for AarResourcesCompilerTransform: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-2\files-2.1\d0f92c0b26fabb47a28488bab3cc8456\navigation-ui-2.3.0.
         > Android resource compilation failed
           AAPT: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-2\files-2.1\9db20844a7f2758cbc14bea528bced6c\androidx.navigation.ui: error: The system cannot find the file specified. (2).

Any help appreciated..!

3
  • 1
    Have you get any success? I am also facing the same issue. – Narender Gusain Aug 8 '20 at 13:33
  • Yes i fixed the issue – Manikandan Ram Aug 9 '20 at 4:53
  • Im writing the answer for you, But If you are facing the issue even after working on my answer, Comment me, I will help you out..! – Manikandan Ram Aug 9 '20 at 5:03
1

I resoved this issue, it's gradle cache problem. So i just added the gradle path "GRADLE_USER_HOME" in Environment variable of Configure system and let keep the gradle setting in Global Tool configuration. Through this we tell the gradle which directory to use for it's cache.

0

Check the configuration once...

  1. Whether the SDK is properly installed and Environment setup is done
  2. Java path is set correctly in the Environment variable

If you configured the above things properly,You will not get the error,

Still facing the error even after setting up the environment, Then jenkins is unable to handle the app:processDebugResources task,

Solution

Manually generate the gradle build in the jenkins inside the jenkins workspace via command line,

Then run the job in Jenkins

You will get the blue success ball in jenkins job for sure

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.