Android Question 14.2 beta R8 error compiling

Scantech

Well-Known Member
Licensed User
Longtime User
B4A Version: 14.20 BETA #1
Parsing code. (4.88s)
Java Version: 19
Building folders structure. (0.27s)
Compiling code. (3.70s)
Compiling layouts code. (0.10s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.69s)
Linking resources (28.14s)
build tools: 36.0.0, android jar: android-36
Compiling generated Java code. (3.86s)
Selecting dexer based on #R8Optimizer flag. (0.00s)
Dexing and optimizing with R8 Error
Error: Missing class androidx.concurrent.futures.AbstractResolvableFuture (referenced from: void com.google.firebase.concurrent.DelegatingScheduledFuture.<init>(com.google.firebase.concurrent.DelegatingScheduledFuture$Resolver) and 1 other context)
Missing class androidx.concurrent.futures.CallbackToFutureAdapter$Resolver (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.concurrent.futures.CallbackToFutureAdapter (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.datastore.core.CorruptionException (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 3 other contexts)
Missing class androidx.datastore.core.DataStore (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.SessionDatastoreImpl.dataStore and 16 other contexts)
Missing class androidx.datastore.core.handlers.ReplaceFileCorruptionHandler (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.PreferenceDataStoreDelegateKt (referenced from: void com.google.firebase.sessions.FirebaseSessionsRegistrar$Companion$1.<init>())
Missing class androidx.datastore.preferences.PreferenceDataStoreFile (referenced from: java.io.File com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$2.invoke() and 1 other context)
Missing class androidx.datastore.preferences.core.MutablePreferences (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2.invoke(androidx.datastore.preferences.core.MutablePreferences, kotlin.coroutines.Continuation) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferenceDataStoreFactory (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.core.Preferences$Key (referenced from: androidx.datastore.preferences.core.Preferences$Key com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.SESSION_ID and 22 other contexts)
Missing class androidx.datastore.preferences.core.Preferences (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 9 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesFactory (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesKeys (referenced from: void com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.<clinit>() and 1 other context)
Missing class androidx.datastore.preferences.core.PreferencesKt (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache.updateConfigValue(androidx.datastore.preferences.core.Preferences$Key, java.lang.Object, kotlin.coroutines.Continuation))
Missing class com.google.common.util.concurrent.internal.InternalFutureFailureAccess (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class com.google.common.util.concurrent.internal.InternalFutures (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class kotlinx.coroutines.tasks.TasksKt (referenced from: java.lang.Object com.google.firebase.sessions.InstallationId$Companion.create(com.google.firebase.installations.FirebaseInstallationsApi, kotlin.coroutines.Continuation))
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:131)
at com.android.tools.r8.R8.main(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:5)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at Version.fakeStackEntry(Version_8.9.27.java:0)
at com.android.tools.r8.S.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:5)
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:82)
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:32)
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:31)
at com.android.tools.r8.R8.b(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:48)
at com.android.tools.r8.R8.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1589)
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:118)
... 1 more
Caused by: com.android.tools.r8.internal.g: Missing class androidx.concurrent.futures.AbstractResolvableFuture (referenced from: void com.google.firebase.concurrent.DelegatingScheduledFuture.<init>(com.google.firebase.concurrent.DelegatingScheduledFuture$Resolver) and 1 other context)
Missing class androidx.concurrent.futures.CallbackToFutureAdapter$Resolver (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.concurrent.futures.CallbackToFutureAdapter (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.datastore.core.CorruptionException (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 3 other contexts)
Missing class androidx.datastore.core.DataStore (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.SessionDatastoreImpl.dataStore and 16 other contexts)
Missing class androidx.datastore.core.handlers.ReplaceFileCorruptionHandler (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.PreferenceDataStoreDelegateKt (referenced from: void com.google.firebase.sessions.FirebaseSessionsRegistrar$Companion$1.<init>())
Missing class androidx.datastore.preferences.PreferenceDataStoreFile (referenced from: java.io.File com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$2.invoke() and 1 other context)
Missing class androidx.datastore.preferences.core.MutablePreferences (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2.invoke(androidx.datastore.preferences.core.MutablePreferences, kotlin.coroutines.Continuation) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferenceDataStoreFactory (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.core.Preferences$Key (referenced from: androidx.datastore.preferences.core.Preferences$Key com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.SESSION_ID and 22 other contexts)
Missing class androidx.datastore.preferences.core.Preferences (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 9 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesFactory (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesKeys (referenced from: void com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.<clinit>() and 1 other context)
Missing class androidx.datastore.preferences.core.PreferencesKt (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache.updateConfigValue(androidx.datastore.preferences.core.Preferences$Key, java.lang.Object, kotlin.coroutines.Continuation))
Missing class com.google.common.util.concurrent.internal.InternalFutureFailureAccess (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class com.google.common.util.concurrent.internal.InternalFutures (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class kotlinx.coroutines.tasks.TasksKt (referenced from: java.lang.Object com.google.firebase.sessions.InstallationId$Companion.create(com.google.firebase.installations.FirebaseInstallationsApi, kotlin.coroutines.Continuation))
at com.android.tools.r8.internal.Le0.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:21)
at com.android.tools.r8.internal.Le0.error(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1)
at com.android.tools.r8.shaking.M.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1975)
at com.android.tools.r8.shaking.M.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1622)
at com.android.tools.r8.R8.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1510)
at com.android.tools.r8.R8.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:206)
at com.android.tools.r8.R8.c(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:8)
at com.android.tools.r8.R8.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1588)
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:28)
... 4 more
Suppressed: java.lang.RuntimeException: com.android.tools.r8.internal.g: Missing class androidx.concurrent.futures.AbstractResolvableFuture (referenced from: void com.google.firebase.concurrent.DelegatingScheduledFuture.<init>(com.google.firebase.concurrent.DelegatingScheduledFuture$Resolver) and 1 other context)
Missing class androidx.concurrent.futures.CallbackToFutureAdapter$Resolver (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.concurrent.futures.CallbackToFutureAdapter (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.datastore.core.CorruptionException (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 3 other contexts)
Missing class androidx.datastore.core.DataStore (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.SessionDatastoreImpl.dataStore and 16 other contexts)
Missing class androidx.datastore.core.handlers.ReplaceFileCorruptionHandler (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.PreferenceDataStoreDelegateKt (referenced from: void com.google.firebase.sessions.FirebaseSessionsRegistrar$Companion$1.<init>())
Missing class androidx.datastore.preferences.PreferenceDataStoreFile (referenced from: java.io.File com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$2.invoke() and 1 other context)
Missing class androidx.datastore.preferences.core.MutablePreferences (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2.invoke(androidx.datastore.preferences.core.MutablePreferences, kotlin.coroutines.Continuation) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferenceDataStoreFactory (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.core.Preferences$Key (referenced from: androidx.datastore.preferences.core.Preferences$Key com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.SESSION_ID and 22 other contexts)
Missing class androidx.datastore.preferences.core.Preferences (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 9 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesFactory (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesKeys (referenced from: void com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.<clinit>() and 1 other context)
Missing class androidx.datastore.preferences.core.PreferencesKt (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache.updateConfigValue(androidx.datastore.preferences.core.Preferences$Key, java.lang.Object, kotlin.coroutines.Continuation))
Missing class com.google.common.util.concurrent.internal.InternalFutureFailureAccess (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class com.google.common.util.concurrent.internal.InternalFutures (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class kotlinx.coroutines.tasks.TasksKt (referenced from: java.lang.Object com.google.firebase.sessions.InstallationId$Companion.create(com.google.firebase.installations.FirebaseInstallationsApi, kotlin.coroutines.Continuation))
at com.android.tools.r8.internal.Le0.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:27)
at com.android.tools.r8.shaking.M.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:1977)
... 10 more
Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.internal.g: Missing class androidx.concurrent.futures.AbstractResolvableFuture (referenced from: void com.google.firebase.concurrent.DelegatingScheduledFuture.<init>(com.google.firebase.concurrent.DelegatingScheduledFuture$Resolver) and 1 other context)
Missing class androidx.concurrent.futures.CallbackToFutureAdapter$Resolver (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.concurrent.futures.CallbackToFutureAdapter (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.privacysandbox.ads.adservices.java.internal.CoroutineAdapterKt.asListenableFuture(kotlinx.coroutines.Deferred, java.lang.Object))
Missing class androidx.datastore.core.CorruptionException (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 3 other contexts)
Missing class androidx.datastore.core.DataStore (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.SessionDatastoreImpl.dataStore and 16 other contexts)
Missing class androidx.datastore.core.handlers.ReplaceFileCorruptionHandler (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.PreferenceDataStoreDelegateKt (referenced from: void com.google.firebase.sessions.FirebaseSessionsRegistrar$Companion$1.<init>())
Missing class androidx.datastore.preferences.PreferenceDataStoreFile (referenced from: java.io.File com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$2.invoke() and 1 other context)
Missing class androidx.datastore.preferences.core.MutablePreferences (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2.invoke(androidx.datastore.preferences.core.MutablePreferences, kotlin.coroutines.Continuation) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferenceDataStoreFactory (referenced from: androidx.datastore.core.DataStore com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion.sessionConfigsDataStore(android.content.Context) and 1 other context)
Missing class androidx.datastore.preferences.core.Preferences$Key (referenced from: androidx.datastore.preferences.core.Preferences$Key com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.SESSION_ID and 22 other contexts)
Missing class androidx.datastore.preferences.core.Preferences (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 9 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesFactory (referenced from: androidx.datastore.preferences.core.Preferences com.google.firebase.sessions.FirebaseSessionsComponent$MainModule$Companion$sessionConfigsDataStore$1.invoke(androidx.datastore.core.CorruptionException) and 2 other contexts)
Missing class androidx.datastore.preferences.core.PreferencesKeys (referenced from: void com.google.firebase.sessions.SessionDatastoreImpl$FirebaseSessionDataKeys.<clinit>() and 1 other context)
Missing class androidx.datastore.preferences.core.PreferencesKt (referenced from: java.lang.Object com.google.firebase.sessions.settings.SettingsCache.updateConfigValue(androidx.datastore.preferences.core.Preferences$Key, java.lang.Object, kotlin.coroutines.Continuation))
Missing class com.google.common.util.concurrent.internal.InternalFutureFailureAccess (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class com.google.common.util.concurrent.internal.InternalFutures (referenced from: void com.google.common.util.concurrent.Futures$CallbackListener.run())
Missing class kotlinx.coroutines.tasks.TasksKt (referenced from: java.lang.Object com.google.firebase.sessions.InstallationId$Companion.create(com.google.firebase.installations.FirebaseInstallationsApi, kotlin.coroutines.Continuation))]


Tip: press Ctrl + R to export IDE state for AI assistants.

I enabled it and added the manifest codes.
 

Scantech

Well-Known Member
Licensed User
Longtime User
Compiling now is not easy as it used to be. Now, I have to worry about adding keep and dontwarn in manifest. thankfully, AI showed me the direction.

B4X:
AddProguardText(
    -dontwarn androidx.concurrent.futures.**
    -dontwarn androidx.datastore.**
    -dontwarn com.google.common.util.concurrent.internal.**
    -dontwarn kotlinx.coroutines.tasks.**
)
 
Last edited:
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
My new laptop crashed few days ago and I still have not tested it in runtime if it has issues or not. I had an old laptop from 2015 took 20 minutes to compile in R8 mode. I'm not compiling anymore with this junk laptop. It did compile ok, not sure in runtime.
Large list of libraries attached.
 

Attachments

  • libraries3.jpg
    libraries3.jpg
    23.1 KB · Views: 64
  • libraries2.jpg
    libraries2.jpg
    73.4 KB · Views: 60
  • libraries1.jpg
    libraries1.jpg
    77 KB · Views: 61
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
debug runtime all kinds of errors. I get the feeling this old project is stuck with D8. R8 is pain in a##.

Logger connected to: R5CRC0F37BK
--------- beginning of main
Copying updated assets files (120)
:null,0
java.lang.ClassNotFoundException: b4a$example$forddecoderlibrary
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:591)
at java.lang.Class.forName(Class.java:496)
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(SourceFile:28)
at anywheresoftware.b4a.shell.Shell.createObject(SourceFile:10)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:491)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
at scantech.cargaugepronew.starter.onCreate(SourceFile:151)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.ClassNotFoundException: b4a$example$forddecoderlibrary
... 20 more
java.lang.RuntimeException: Unable to create service scantech.cargaugepronew.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5595)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:369)
at anywheresoftware.b4a.BA.raiseEvent(SourceFile:7)
at scantech.cargaugepronew.starter.onCreate(SourceFile:170)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:272)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
... 12 more
:null,0
java.lang.ClassNotFoundException: b4a$example$forddecoderlibrary
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:591)
at java.lang.Class.forName(Class.java:496)
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(SourceFile:28)
at anywheresoftware.b4a.shell.Shell.createObject(SourceFile:10)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:491)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
at scantech.cargaugepronew.starter.onCreate(SourceFile:151)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.ClassNotFoundException: b4a$example$forddecoderlibrary
... 20 more
*** Service (starter) Create ***
java.lang.RuntimeException: Unable to create service scantech.cargaugepronew.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5595)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:369)
at anywheresoftware.b4a.BA.raiseEvent(SourceFile:7)
at scantech.cargaugepronew.starter.onCreate(SourceFile:170)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:272)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
... 12 more
PackageAdded: package:com.android.vending
:null,0
java.lang.ClassNotFoundException: XTEALIB$XTEA
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:591)
at java.lang.Class.forName(Class.java:496)
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(SourceFile:28)
at anywheresoftware.b4a.shell.Shell.createObject(SourceFile:10)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:491)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
at scantech.cargaugepronew.starter.onCreate(SourceFile:151)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.ClassNotFoundException: XTEALIB$XTEA
... 20 more
*** Service (starter) Create ***
java.lang.RuntimeException: Unable to create service scantech.cargaugepronew.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5595)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:369)
at anywheresoftware.b4a.BA.raiseEvent(SourceFile:7)
at scantech.cargaugepronew.starter.onCreate(SourceFile:170)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:272)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
... 12 more
:null,0
java.lang.ClassNotFoundException: de$amberhome$preferences$PreferenceManagerWrapper
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(SourceFile:89)
at anywheresoftware.b4a.shell.Shell.createObject(SourceFile:10)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:491)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
at scantech.cargaugepronew.starter.onCreate(SourceFile:151)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
*** Service (starter) Create ***
java.lang.RuntimeException: Unable to create service scantech.cargaugepronew.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5595)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:369)
at anywheresoftware.b4a.BA.raiseEvent(SourceFile:7)
at scantech.cargaugepronew.starter.onCreate(SourceFile:170)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:272)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
... 12 more
:null,0
java.lang.ClassNotFoundException: de$amberhome$preferences$PreferenceManagerWrapper
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(SourceFile:89)
at anywheresoftware.b4a.shell.Shell.createObject(SourceFile:10)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:491)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
at scantech.cargaugepronew.starter.onCreate(SourceFile:151)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
*** Service (starter) Create ***
java.lang.RuntimeException: Unable to create service scantech.cargaugepronew.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5595)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:369)
at anywheresoftware.b4a.BA.raiseEvent(SourceFile:7)
at scantech.cargaugepronew.starter.onCreate(SourceFile:170)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:272)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
... 12 more
java.lang.RuntimeException: Unable to create service scantech.cargaugepronew.starter: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.write(byte[])' on a null object reference
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5595)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2703)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.write(byte[])' on a null object reference
at anywheresoftware.b4a.shell.Shell.virtualAssets(SourceFile:249)
at anywheresoftware.b4a.shell.Shell.start(SourceFile:9)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:80)
at scantech.cargaugepronew.starter.onCreate(SourceFile:41)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5582)
... 9 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.write(byte[])' on a null object reference
at anywheresoftware.b4a.shell.ShellConnector.sendControlMessage(SourceFile:7)
at anywheresoftware.b4a.shell.Shell.virtualAssets(SourceFile:31)
... 13 more
Copying updated assets files (120)
*** Service (starter) Create ***
Using FileProvider? true
*** Service (starter) Create completed ***
*** Service (starter) Started ***
** Service (starter) Start **
*** Service (starter) Started completed ***
onAuthStateChanged: P1.c@d79763c
Error occurred on line: 499 (Starter)
java.lang.ClassNotFoundException: flm$scrollpanel$test$clsscrollpanel
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(SourceFile:89)
at anywheresoftware.b4a.shell.Shell.createObject(SourceFile:10)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(SourceFile:491)
at anywheresoftware.b4a.shell.Shell.raiseEvent(SourceFile:12)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(SourceFile:264)
at scantech.cargaugepronew.main.initializeGlobals(SourceFile:9)
at scantech.cargaugepronew.main.afterFirstLayout(SourceFile:135)
at scantech.cargaugepronew.main.access$000(SourceFile:1)
at scantech.cargaugepronew.main$WaitForLayout.run(SourceFile:68)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9634)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
** Activity (main) Create (first time) **
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
My new laptop crashed few days ago and I still have not tested it in runtime if it has issues or not. I had an old laptop from 2015 took 20 minutes to compile in R8 mode. I'm not compiling anymore with this junk laptop. It did compile ok, not sure in runtime.
Large list of libraries attached.
Which libraries are you using? Maybe you are missing real references.

The reason that I'm asking, is that the configuration should go into the library proguard rules. Once we get most libraries configured correctly, it will be mostly transparent to use R8 instead of D8.
i think the question is which libraries are you not using 😁😁😁

i have never seen a project with so many libraries. i try to avoid as much as i can 3rd party libraries for my projects since every time we have updates sdk or b4a with 3rd party libraries you risk to have issues. if you can avoid them even if it means to remove those features from your app, avoid them.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
R8 is pain in a##.
It will become easier as we progress. The issues you encounter are related to compiled libraries missing their rules.
1. The compiler now generates those rules during library compilation.
2. With the community help, rules for older libraries will be collected and documented.

Once you say that these rules work, I will add them to the relevant libraries pages.
 
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
Erel, thanks for showing me how to add keep class. I get the idea now. The error above is gone, but there are more to come. The app still wont start because of other missing class. I have way too many libraries and takes 5 minutes to compile R8. I'm building a keep class list for my project and will post the relevant ones not my private library which is not needed. Thanks again.
 
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
B4X:
AddProguardText(
    -dontwarn androidx.concurrent.futures.**
    -dontwarn androidx.datastore.**
    -dontwarn com.google.common.util.concurrent.internal.**
    -dontwarn kotlinx.coroutines.tasks.**
  
    -keep class flm.scrollpanel.** { *; }
    -keep class b4a.example.** { *; }
    -keep class cargauge.customlistview4.** { *; }
  
    -keep class XTEALIB.** { *; }
    -keep class de.amberhome.preferences.** { *; }
    -keep class de.amberhome.** { *; }
    -keep class njdude.custom.** { *; }
    -keep class edsmith.click.** { *; }
    -keep class com.georgieapps.backster.** { *; }
    -keep class androidx.recyclerview.** { *; }
    -keep class dudu.paint.** { *; }
    -keep class com.google.android.material.snackbar.** { *; }

)

Finally the app starts. I have tested 70 percent of its functions. As i was testing, clicking here and there i discovered more missing class error. I suggest you guys test your app 100 percent. The above code is proguard rules required on my app. First 3 Keep Class is my private library which you will not need. The rest of the keep class are for the libraries available at the forum. They are really old libraries, not all. Turns out it was not that bad after all. Have faith.
 
Last edited:
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
B4X:
    -keep class androidx.appcompat.app.** { *; }
    -keep class androidx.core.widget.** { *; }
2 more to the list. Related to old preference library (de.amberhome). It was weird adding a complete name does not work on some of them? i had to cut off few name words on these 2.

B4X:
-keep class net.xpece.android.support.widget.** { *; }
This one too
 
Last edited:
Upvote 0
Top