-
-
Notifications
You must be signed in to change notification settings - Fork 55
Description
I did
./gradlew clean
./gradlew build
I faced this error
> Task :app:minifyBetaReleaseWithR8 FAILED ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/cyberboy/SmartCookieWeb/app/build/outputs/mapping/betaRelease/missing_rules.txt. ERROR: R8: Missing class androidx.compose.animation.tooling.ComposeAnimation (referenced from: void androidx.compose.ui.tooling.animation.PreviewAnimationClock$trackAnimateXAsState$1.invoke(java.lang.Object) and 13 other contexts) Missing class androidx.compose.animation.tooling.ComposeAnimationType (referenced from: androidx.compose.animation.tooling.ComposeAnimationType androidx.compose.ui.tooling.animation.AnimateXAsStateComposeAnimation.type and 15 other contexts) Missing class androidx.window.extensions.WindowExtensions (referenced from: androidx.window.extensions.layout.WindowLayoutComponent androidx.window.layout.SafeWindowLayoutComponentProvider$windowLayoutComponent$2.invoke()) Missing class androidx.window.extensions.WindowExtensionsProvider (referenced from: androidx.window.extensions.layout.WindowLayoutComponent androidx.window.layout.SafeWindowLayoutComponentProvider$windowLayoutComponent$2.invoke()) Missing class androidx.window.extensions.layout.DisplayFeature (referenced from: androidx.window.layout.WindowLayoutInfo androidx.window.layout.ExtensionsWindowLayoutInfoAdapter.translate$window_release(android.app.Activity, androidx.window.extensions.layout.WindowLayoutInfo)) Missing class androidx.window.extensions.layout.FoldingFeature (referenced from: androidx.window.layout.FoldingFeature androidx.window.layout.ExtensionsWindowLayoutInfoAdapter.translate$window_release(android.app.Activity, androidx.window.extensions.layout.FoldingFeature) and 1 other context) Missing class androidx.window.extensions.layout.WindowLayoutComponent (referenced from: androidx.window.extensions.layout.WindowLayoutComponent androidx.window.layout.ExtensionWindowLayoutInfoBackend.component and 6 other contexts) Missing class androidx.window.extensions.layout.WindowLayoutInfo (referenced from: void androidx.window.layout.ExtensionWindowLayoutInfoBackend$MulticastConsumer.accept(androidx.window.extensions.layout.WindowLayoutInfo) and 2 other contexts) Missing class androidx.window.sidecar.SidecarDeviceState (referenced from: androidx.window.sidecar.SidecarDeviceState androidx.window.layout.SidecarCompat$DistinctSidecarElementCallback.lastDeviceState and 12 other contexts) Missing class androidx.window.sidecar.SidecarDisplayFeature (referenced from: java.lang.Boolean androidx.window.layout.SidecarAdapter$translate$checkedFeature$1.invoke(androidx.window.sidecar.SidecarDisplayFeature) and 12 other contexts) Missing class androidx.window.sidecar.SidecarInterface$SidecarCallback (referenced from: androidx.window.sidecar.SidecarInterface$SidecarCallback androidx.window.layout.SidecarCompat$DistinctSidecarElementCallback.callbackInterface and 7 other contexts) Missing class androidx.window.sidecar.SidecarInterface (referenced from: androidx.window.sidecar.SidecarInterface androidx.window.layout.SidecarCompat.sidecar and 11 other contexts) Missing class androidx.window.sidecar.SidecarProvider (referenced from: androidx.window.sidecar.SidecarInterface androidx.window.layout.SidecarCompat$Companion.getSidecarCompat$window_release(android.content.Context) and 1 other context) Missing class androidx.window.sidecar.SidecarWindowLayoutInfo (referenced from: java.util.List androidx.window.layout.SidecarAdapter$Companion.getSidecarDisplayFeatures(androidx.window.sidecar.SidecarWindowLayoutInfo) and 7 other contexts)
To Reproduce
Steps to reproduce the behavior:
- Clone this project
- Change these variables in UserPreferences.kt file
-
/** * The proxy host used when [proxyChoice] is [ProxyChoice.MANUAL]. */ var proxyHost by preferences.stringPreference(USE_PROXY_HOST, "localhost") /** * The proxy port used when [proxyChoice] is [ProxyChoice.MANUAL]. */ var proxyPort by preferences.intPreference(USE_PROXY_PORT, 8432) ``` - Now ./gradlew clean
- ./gradlew build
I am working for a NGO who provide offline education solutions. I am trying to achieve to create an apk which has proxy setting enabled already with the above value.
What I have tried so far.
Added these in build.gradle file in /app directory
implementation "androidx.compose.ui:ui:1.5.0"
implementation "androidx.compose.animation:animation:1.5.0"
implementation "androidx.window:window:1.0.0"
I have also following lines in proguard-project.txt file
# Keep Compose Animation classes
-keep class androidx.compose.animation.tooling.** { *; }
# Keep Window Extensions classes
-keep class androidx.window.extensions.** { *; }
-keep class androidx.window.sidecar.** { *; }
# Keep Window Layout classes
-keep class androidx.window.layout.** { *; }
Please help me thanks.