Malformed input or input contains unmappable characters: [Android]
Asked by Favour Olije:

Here is the error gotten  

* What went wrong:  
Execution failed for task ':app:mergeDebugJavaResource'.  
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction  
> Malformed input or input contains unmappable characters: /com/....java - ??.mine  

<br />

This is the data passed to the **org.gradle.jvmargs** variable in the **gradle.properties** file  

<br />

```
org.gradle.jvmargs=-Xmx3096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
```

<br />

<br />

I am not sure what should be done as the Gradle task works fine on my local machine.


Answers:
author: Theodora Boudale
body: Hi [@Favour Olije](/t5/user/viewprofilepage/user-id/5169763) and welcome to the community!

I assume that you get this error during a Pipelines build in a Bitbucket repository?

Pipelines builds run in Docker containers using the Docker image specify in your bitbucket-pipeline.yml file. The environment on your local machine may not be the same as in the Docker container where your build is running.

I would suggest debugging this locally with Docker, you can use the following guide:

* <https://confluence.atlassian.com/bbkb/debug-pipelines-locally-with-docker-1167698072.html>

Please make sure you use the same Docker image that you have specified as a build container in your bitbucket-pipeline.yml file for the failed step and a clone of the repo at the same commit as your failed step. If your build doesn't use services, you can ignore the section "Testing with build services".

After you have the container up and running, you can execute the commands from your bitbucket-pipeline.yml file in order to see if the issue is reproducible, and also any additional commands to debug the issue.

Kind regards,  
Theodora

comments: author: Favour Olije
body: Thanks, Theodora!  

Not sure I fully know what to do next but below is the script in the bitbucket-pipelines.yml file   

<br />

```
image: androidsdk/android-30

pipelines:
  default:
    - step:
        size: 2x
        name: Android Debug Application
        script:
          - ./gradlew assembleDebug
```

Any suggestions, please?


author: Theodora Boudale
body: Hi,

The step on your bitbucket-pipelines.yml file runs in a Docker container that is using the following DockerHub image:

* <https://hub.docker.com/r/androidsdk/android-30>

Since it has **size: 2x**, it can use up to 8 GB of memory.

Please see the details in the link of my previous reply on how to debug this locally with Docker:

* <https://confluence.atlassian.com/bbkb/debug-pipelines-locally-with-docker-1167698072.html>

In Step 2 of this guide, instead of python:3 you will want to use androidsdk/android-30.

In Step 3, please use 8g instead of 4g for the parameters --memory and --memory-swap.

Once you have the Docker container up and running, you can execute the command from your script (./gradlew assembleDebug) to see if the issue is reproducible. If it is, you can run additional commands in the Docker container to further debug this issue.

Kind regards,  
Theodora


author: Favour Olije
body: Hi Theodora  

Thanks for the detailed explanation, I will give it a try.


Tags: android

bitbucket-cloud

cloud