Reproducible Issue with R8’s
fullMode in Kotlin Android Project
This project showcases a reproducible issue related to R8’s
fullMode in a Kotlin Android project. When utilizing R8’s
fullMode, classes are organized in an unexpected manner, resulting in the display of a variable set as
Fruit.Cherry being shown as
To replicate the issue, ensure you have the following prerequisites set up:
- Android Studio installed on your system.
- Basic familiarity with Kotlin and Android development concepts.
Steps to Reproduce
- Clone the repository:
git clone [email protected]:theapache64/r8-full-mode-issue-repro.git
cd [email protected]:theapache64/r8-full-mode-issue-repro.git
Open the project in Android Studio.
Create a release build using the “Build” menu or the Gradle task panel.
Run the app on an emulator or physical device.
Observe the app’s behavior. The program should assign a value to
Fruit.Cherry, but it is displayed as
The app should correctly display
The problem appears to be connected to the
fullMode configuration in R8. This setting results in unexpected class organization, resulting unpredictable code.