Fix Android build with OpenJDK 11 #2681
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We need to target Java 8, not 11, so pass the argument explicitly. This
avoids dex errors when launching the application on the phone:
Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~f8ynkbFXC9Wk5KqkL_6evA==/com.google.chip.chiptool-zDQFz6dhQ1G1vVGvQcGP0w==/base.apk because: Failure to verify dex file '/data/app/~~f8ynkbFXC9Wk5KqkL_6evA==/com.google.chip.chiptool-zDQFz6dhQ1G1vVGvQcGP0w==/base.apk': Method 25081(Lchip/devicecontroller/AndroidChipStack;.-$$Nest$mhandleConnectionError) has code, but is marked native or abstract
Problem
Android app doesn't load with JARs built with GN & OpenJDK 11.
Summary of Changes
Fix the javac options to target Java 8.