Android Question B4A Beta #1 [maybe resolved] different project, failed compile

drgottjr

Expert
Licensed User
Longtime User
RESOLVED (maybe)
updating exoplayer to 3.02 (plus multidex: true) seems to resolve compiler errors. but, for whatever reason i'm having a hell of a time connecting to device from ide through adb or bridge. fyi: when using bridge, complier window says, "installing with b4a bridge. completed successfully", but i do not see the usual "update this app" on bridge side. and when i run the app, the older, pre-13 version runs, not the just-compiled version which was allegedgly installed "successfully". but, as we say, algo es algo.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

similar suite of errors as those i posted yesterday (for a different project). this one just streams audio. previous post related to a much more complex app.

B4X:
B4A Version: 13.00 BETA #1
Parsing code.    (0.07s)
    Java Version: 19
Building folders structure.    (0.78s)
Compiling code.    (0.07s)
Compiling layouts code.    (0.02s)
Organizing libraries.    (0.09s)
    (AndroidX SDK)
Compiling resources    (4.95s)
Linking resources    (0.76s)
    build tools: 34.0.0, android jar: android-34
Compiling generated Java code.    (12.71s)
Finding libraries that need to be dexed.    (0.03s)
Dex: c:\android\tools\..\extras\b4a_remote\androidx\media\media\1.7.0\unpacked-media-1.7.0\jars\classes    (6.37s)
Dex: c:\android\tools\..\extras\b4a_remote\androidx\recyclerview\recyclerview\1.3.2\unpacked-recyclerview-1.3.2\jars\classes    (7.86s)
Dex: c:\android\tools\..\extras\b4a_remote\androidx\viewpager2\viewpager2\1.1.0\unpacked-viewpager2-1.1.0\jars\classes    (3.30s)
Dex code    (8.35s)
Dex merge    Error
Error in C:\Android\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63755708086400\dex_v1\guava-30.1.1.zip:classes.dex:
Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: C:\Android\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63755708086400\dex_v1\guava-30.1.1.zip:classes.dex, C:\Android\tools\..\extras\b4a_local\unpacked-com.google.guava-listenablefuture-63856915712000\dex_v1\com.google.guava-listenablefuture.zip:classes.dex
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Android\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63755708086400\dex_v1\guava-30.1.1.zip:classes.dex
    at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1269)
    at com.android.tools.r8.D8.main(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:5)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Android\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63755708086400\dex_v1\guava-30.1.1.zip:classes.dex
    at Version.fakeStackEntry(Version_8.3.37.java:0)
    at com.android.tools.r8.Q.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:5)
    at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:244)
    at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:90)
    at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:909)
    at com.android.tools.r8.internal.po.b(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:99)
    at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1041)
    at com.android.tools.r8.D8.b(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:514)
    at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1076)
    at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1256)
    ... 1 more
Caused by: com.android.tools.r8.internal.h: Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: C:\Android\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63755708086400\dex_v1\guava-30.1.1.zip:classes.dex, C:\Android\tools\..\extras\b4a_local\unpacked-com.google.guava-listenablefuture-63856915712000\dex_v1\com.google.guava-listenablefuture.zip:classes.dex
    at com.android.tools.r8.internal.X30.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:346)
    at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:232)
    at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:91)
    at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
    at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:32)
    at com.android.tools.r8.graph.q4$a.d(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:6)
    at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:264)
    at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:222)
    at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:219)
    at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:809)
    at com.android.tools.r8.D8.d(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:212)
    at com.android.tools.r8.D8.c(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:163)
    at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:906)
    ... 6 more
 
Last edited:

drgottjr

Expert
Licensed User
Longtime User
compiler issue resolved. i turned to b4a-bridge because adb wouldn't start (so far researching issue has not helped). issue with bridge is that it disconnects after each compile. as i am not familiar with bridge, i thought that might be odd.

if i have to select 1 issue only, i select adb. it doesn't start, and i can't get it to run (from command line). nothing else is running on ports 5037 or 5555. this has not happened in 12 years, last 5 years on same pc).
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
What does it mean? What do you see when you try to run the project?
B4X:
B4A Version: 13.00 BETA #1
Parsing code.    (0.00s)
    Java Version: 19
Building folders structure.    (0.04s)
Compiling code.    (0.00s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.03s)
    (AndroidX SDK)
Compiling resources    (0.04s)
Linking resources    (0.27s)
    build tools: 34.0.0, android jar: android-34
Compiling generated Java code.    (2.08s)
Finding libraries that need to be dexed.    (0.01s)
Dex code    (3.40s)
Dex merge    (9.19s)
Copying libraries resources    (2.11s)
ZipAlign file.    (0.04s)
Signing package file (private key).    (1.10s)
Installing file to device.    Error
* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
adb.exe: failed to check server version: cannot connect to daemon
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
Have you tried to restart the PC? Maybe their is a stale adb process that locks the port.
pc is started every morning. also tried restarting several times when deploying to device first failed.
 
Upvote 0
Top