Android Question [SOLVED] Problem with AppUpdating 2.0

makis_best

Well-Known Member
Licensed User
Longtime User
Hi

I try to use this update lib but when I run my app I get this error
How can I solve it?

B4X:
B4A Version: 10.60
Parsing code.    (0.89s)
    Java Version: 8
Building folders structure.    (0.48s)
Compiling code.    (3.42s)
Compiling layouts code.    (0.18s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    (0.00s)
Compiling debugger engine code.    (0.07s)
Compiling generated Java code.    (0.19s)
Convert byte code - optimized dex.    Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$Watchdog;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Base64;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Buffer;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Buffer$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokio/Buffer$2;
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.runMultiDex(Main.java:366)
    at com.android.dx.command.dexer.Main.runDx(Main.java:291)
    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
 
 
Upvote 0
Hi all,
you may find the most recent version here.
It was needed to solve an incompatibility issue with NB6 and it was reported to work well with Android 8/9/10.
I know that it's a long time I should've updated to a finall version and publish it in its main thread..

Sorry everybody for the backlog.
 
Upvote 0
I try the new library and @Erel
but now I get the error about manifest editor

B4X:
B4A Version: 10.60
Parsing code.    (0.77s)
    Java Version: 8
Building folders structure.    (0.27s)
Compiling code.    Error
Error parsing manifest script:
Module eu.dgconsulting.appupdating.newinst2_br not found (Manifest Editor)
 
Upvote 0
Hi, can you confirm you're using version 2.04 from the link in post #3 above?
 
Upvote 0
That's correct. I used the 2.04 label only to differenziate that specific solution for the NB6 issue. Code base is 2.03
So the problem seems that service newinst2 is not found altogh is there along with the class cl_appupdate..
 
Upvote 0
Newinst2 is a service. It's used towake up your app when the OS registers an update.
You reference it in your Manifest and the compiler arror you reported shows a missing newinst2 service, if I read correctly
 
Upvote 0
Newinst2 is a service. It's used towake up your app when the OS registers an update.
You reference it in your Manifest and the compiler arror you reported shows a missing newinst2 service, if I read correctly
How exactly I can do that?
 
Upvote 0
I'm updating the original AppUpdating2 thread since even basic instructions changed since the 2.00 version of this lib.
 
Upvote 0
So... I need to follow only the basic instructions of the AppUpdating2 and forget about all the other changes on post?
 
Upvote 0
Fundamentally you have 3 steps to follow in order to use the lib in its b4xlib format:
1. copy the lib to your Additional Libraries folder (I suggest the B4X sub-folder)
2. add the Manifest code from this post to your app's manifest
3. copy code from the Main section in post#2 of the original AppUpdating thread to your app's Main and be sure to call it before the "install" step (when a new version of your app is found).

Old 2.03/2.04 demo is still valid; you can use it as a"template" in order to properly use the lib. It will take me some time to update it to 2.05, but it will be almost identical to the previous one. What will be interesting will be the creation of a B4xPages demo..
 
Last edited:
Upvote 0
Back
Top