Java Question Error after desugar

Pendrush

Well-Known Member
Licensed User
You can download libs from here.
After desugar Huawei libs... On compile in B4A I get this error:
B4A Version: 10.2
Java Version: 11
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.00s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.15s)
Compiling generated Java code. (0.73s)
Convert byte code - optimized dex. Error
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
at com.android.dx.command.dexer.Main.runDx(Main.java:293)
at com.android.dx.command.dexer.Main.main(Main.java:249)
at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
... 4 more

Any hint?
 

DonManfred

Expert
Licensed User
What error do you get BEFORE desugaring anything?
 

Pendrush

Well-Known Member
Licensed User
Did not try as I need to merge 6-8 libs still not sure which one, but hianalytics-5.0.1.301.aar is mandatory.
 
Last edited:

Pendrush

Well-Known Member
Licensed User
I have try to include all libs like this
B4X:
@BA.DependsOn(values = {"agconnect-core-1.4.0.300.aar", "base-5.0.0.301.aar", "device-5.0.0.301.aar", "hianalytics-5.0.1.301.aar", "hwid-5.0.1.301.aar", "network-common-4.0.2.300.aar", "network-grs-4.0.2.300.aar", "opendevice-5.0.0.301.aar", "push-5.0.1.300.aar", "stats-5.0.0.301.aar"})
But for example I get error HMS Base not found, opendevice not found.. etc...
 

Pendrush

Well-Known Member
Licensed User
Nope.
HMS Base = base-5.0.0.301.aar
OpenDevice = opendevice-5.0.0.301.aar
They are included, but for some reason hianalytics-5.0.1.301.aar did not find them.
Desugaring should solve this problem?
 

DonManfred

Expert
Licensed User
Desugaring should solve this problem?
NO! Desugaring fixes another problem.

 

Pendrush

Well-Known Member
Licensed User
MultiDex did not help. Without desugaring I get this warnings in log:
=======================================
HiAnalyticsSDK_5.0.1.301
=======================================
HiAnalyticsInstance=> IE-004|HMSBIInitializer init failed,Missing hms sdk
ReportManager=> ReportManager:init instance with url
AAIDProcessor=> begin sync aaid from opendevice sdk
AAIDProcessor=> IE-005|Missing hms opendevice sdk,get aaid failed.Please upgrade the hms version
HiAnalyticsInstanceManager=> IE-005|Missing base sdk
All SDKs are included.
 
Top