Abdul Shadaab
Abdul Shadaab

Reputation: 41

flutter build apk giving error "Execution failed for task ':app:mergeReleaseResources'." on jenkins

I am getting below exception when i build my flutter project on jenkins

C:\ProgramData\Jenkins\.jenkins\workspace\automated test app>flutter build apk 

Building with sound null safety 

Running Gradle task 'assembleRelease'...                        
Parameter format not correct -

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> Multiple task action failures occurred:
> A failure occurred while executing 
 com.android.build.gradle.internal.res.Aapt2CompileRunnable
  > Android resource compilation failed
    ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\846e5094a0f0114af067375a609d094e\transformed\core-1.6.0\res\drawable-mdpi-v4\notification_bg_normal.9.png: AAPT: error: file not found.

> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
  > Android resource compilation failed
    ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\846e5094a0f0114af067375a609d094e\transformed\core-1.6.0\res\drawable-mdpi-v4\notification_bg_low_normal.9.png: AAPT: error: file not found.

 > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
  > Android resource compilation failed
    ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\846e5094a0f0114af067375a609d094e\transformed\core-1.6.0\res\drawable-mdpi-v4\notification_bg_low_pressed.9.png: AAPT: error: file not found.

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 25s
Running Gradle task 'assembleRelease'...                           86.2s
Gradle task assembleRelease failed with exit code 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

Upvotes: 1

Views: 491

Answers (1)

Lapa Ny Aina Tanjona
Lapa Ny Aina Tanjona

Reputation: 1268

I am faced with this problem with Gitlab ci/Runner on Windows 10 and i stucked with all day. The problem is that I have not installed Gitlab-Runner with privileges windows with my user account before :

cd C:\GitLab-Runner
.\gitlab-runner.exe install
.\gitlab-runner.exe start

But after, I installed Gitlab-Runner using my user account. The problems no longer occurs.

cd C:\GitLab-Runner
.\gitlab-runner.exe install --user ".\USERR" --password "MYPASSWORD"
.\gitlab-runner.exe start

So, I think maybe your problem is that you are not running the script with a privileges. The fact that I saw this because when I tried to access the image file. For example : C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\846e5094a0f0114af067375a609d094e\transformed\core-1.6.0\res\drawable-mdpi-v4\notification_bg_normal.9.png

I'm not able to reach the "C:\Windows\System32" without accepting the privileges administrator windows. But if I accept as administrator, I can find the image file.

Upvotes: 1

Related Questions