Android Question Watchface library issues

Dave G

Active Member
Licensed User
I've been trying to get a simple watchface app implemented. Have done them using Xamarin, but having issues with B4A and watchface library.

New project.
Add watchface libarary
Compile and get:
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel$Stub;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel$Stub$Proxy;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver$Stub;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver$Stub$Proxy;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver$MyResultReceiver;
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

I used the sdk from the instructions and the ready to run sdk, to no avail.

1578259344759.png


Thanks in advance
 

Dave G

Active Member
Licensed User
First thanks to everyone that's contributed. I started with the example and that is where I got the exception (see below). I created a smaller project to eliminate anything outside of the watchface library. I've developed non-watchface apps with no problem and am very happy with B4X. I've previously developed mobile app using Windows Mobile, Xamarin, and NSbasic. I created a wear app using Xamarin, but it is very bloated and was looking for an environment that produced leaner apps, which B4X does very well. Thanks.

B4A Version: 9.50
Java Version: 11
Parsing code. (0.01s)
Building folders structure. (0.01s)
Compiling code. (0.10s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (3.77s)
Compiling debugger engine code. (1.52s)
Compiling generated Java code. (3.67s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel$Stub;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel$Stub$Proxy;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver$Stub;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver$Stub$Proxy;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver$MyResultReceiver;
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
 
Upvote 0

Dave G

Active Member
Licensed User
I did upload all three ZIPs and attempted to build the code in WatchFaceWear1_2.zip. As I mentioned above that is where I got the exception in the first place. I then created a skeleton project and got the same exception. Both referenced the warchface library that I Jetified. I have not problem with any other library, just watchface. Thanks
 
Upvote 0
Top