Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
1
Found in
2022.2.0b3
2023.1.0a4
Issue ID
UUM-10962
Regression
Yes
[Android] Build fails with the error "Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8" when project has a custom Manifest
- Open the attached "NotchSafeAreaSample.zip" project
- Go to File > Build Settings
- Make sure that the Android Platform is selected
- Build and Run
Expected result: Build is successful
Actual result: Build fails with a failure message:
{code:java}
A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryMAnifest$ProcessLibWorkAction
{code}
and errors:
{code:java}
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
{code}
{code:java}
CommandInvokationFailure: Gradle build failed.
{code}
Reproducible with: 2022.2.0a18, 2022.2.0b3, 2023.2.0a4
Not reproducible with: 2020.3.37f1, 2021.3.8f1, 2022.1.12f1, 2022.1.12f1, 2022.2.0a17
Notes:
- Workaround for the issue is to add in the 4th line of "AndroidManifest.xml"
{code:java}
android:exported="true{code}
- Tested on MacBook Pro, Chip Apple M1 Max
Comments (3)
-
tibtibc
Mar 03, 2023 05:53
The same for me... Even after adding android:exported="true"
-
JuliusM
Jan 03, 2023 11:19
IMRANKARIMI009, add android:exported="true" attribute to all of activities with intent filters in your custom manifest file.
-
imrankarimi009
Jan 01, 2023 20:06
I am facing same issue on unity 2022.2.1f1 do you have any solution to fix this?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
- [Editor] Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
Resolution Note:
`android:exported` is required by Android when the activity has an intent-filter. The error does not happen when using a templated custom Manifest, only if the user modifies it and adds an intent-filter.
Resolution Note (2023.1.X):
`android:exported` is required by Android when the activity has an intent-filter. The error does not happen when using a templated custom Manifest, only if the user modifies it and adds an intent-filter.