-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[r8] ignore custom multidex.keep files if API >= 21
Context: https://r8.googlesource.com/r8/+/0e5c4339df0207a0e38f11438db84b29f328f777%5E%21/ In R8 1.4.93, they appear to have removed support for custom `multidex.keep` files when `minSdkVersion` >= 21. R8 decides on its own if multidex is needed, and splits up dex files appropriately. Since `r8.jar` will now abort with an error if you specify `multidex.keep` files and `minSdkVersion` >= 21. I feel all we can do in this case is add a new warning if developers specify `@(MultiDexMainDexList)` with R8--then allow R8 to calculate multidex on its own. I updated the `MultiDexCustomMainDexFileList` to check for these scenarios. R8 does appear to create multiple dex files without any multidex settings applied.
- Loading branch information
1 parent
1b36677
commit 40712ea
Showing
4 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Xamarin.Android warning XA4306 | ||
description: XA4306 warning code | ||
ms.date: 05/28/2019 | ||
--- | ||
# Xamarin.Android warning XA4306 | ||
|
||
## Issue | ||
|
||
[d8/r8][r8_source] does not support using custom `multidex.keep` files | ||
if `minSdkVersion` >= 21, e.g. devices where native multidex is | ||
supported. In theses cases, d8/r8 calculates the contents of the main | ||
`classes.dex` without rules specified by developers. | ||
|
||
[This change][r8_commit] in d8/r8 appeared in version 1.4.93. | ||
|
||
## Solution | ||
|
||
Verify you are not declaring any `MultiDexMainDexList` build items. | ||
|
||
Consider submitting a [bug][bug] if your application does not function | ||
after removing any `MultiDexMainDexList` items. | ||
|
||
[r8_source]: https://r8.googlesource.com/ | ||
[r8_commit]: https://r8.googlesource.com/r8/+/0e5c4339df0207a0e38f11438db84b29f328f777%5E%21/ | ||
[bug]: https://github.com/xamarin/xamarin-android/wiki/Submitting-Bugs,-Feature-Requests,-and-Pull-Requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters