Android Question MSSQL Version 1.01 With B4A Version 12.20

romario87027

Active Member
Licensed User
Longtime User
Hi, I don't know if anyone can help me. I was unable to resolve a problem on the MSSQL Version 1.01 library. With B4a Version 9.30 I have no problems. While with b4a Version 12.20 it gives me an error. I don't want to replace the library. Has anyone had the same problem?
B4X:
B4A Versione: 12.20
Analisi del Codice.    (0.14s)
    Java Versione: 11
Building folders structure.    (0.09s)
Compilazione del codice.    (0.38s)
Compilazione del codice di layouts    (0.03s)
Organizzazione Librerie.    (0.10s)
    (AndroidX SDK)
Compilazione risorse    (1.26s)
Collegamento risorse    (0.90s)
Compilazione del codice debugger.    (4.10s)
Compilazione del codice Java prodotto.    (4.63s)
Ricerca librerie che necessitano di essere "dexed".    (0.02s)
Dex code    (6.87s)
Dex merge    Error
Error in C:\android\tools\..\extras\b4a_local\unpacked-mssql-63487362270000\dex_v1\mssql.zip:classes.dex:
Type com.tomlost.MSSQL.MSSQL is defined multiple times: C:\android\tools\..\extras\b4a_local\unpacked-mssql-63487362270000\dex_v1\mssql.zip:classes.dex, C:\B4A\Terminalino_android\Frontalini_05_10_2023\Frontalini\Objects\dexed\com\tomlost\MSSQL\MSSQL.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-mssql-63487362270000\dex_v1\mssql.zip:classes.dex
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:98)
    at com.android.tools.r8.D8.main(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\android\tools\..\extras\b4a_local\unpacked-mssql-63487362270000\dex_v1\mssql.zip:classes.dex
    at Version.fakeStackEntry(Version_3.3.20-dev+aosp1.java:0)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:75)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:28)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:27)
    at com.android.tools.r8.internal.vj.b(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:2)
    at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:22)
    at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:17)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:85)
    ... 1 more
Caused by: com.android.tools.r8.internal.f: Type com.tomlost.MSSQL.MSSQL is defined multiple times: C:\android\tools\..\extras\b4a_local\unpacked-mssql-63487362270000\dex_v1\mssql.zip:classes.dex, C:\B4A\Terminalino_android\Frontalini_05_10_2023\Frontalini\Objects\dexed\com\tomlost\MSSQL\MSSQL.dex
    at com.android.tools.r8.internal.YS.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:14)
    at com.android.tools.r8.internal.YS.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:22)
    at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:36)
    at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:10)
    at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)
    at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:6)
    at com.android.tools.r8.graph.E2$a.e(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
    at com.android.tools.r8.dex.b.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:105)
    at com.android.tools.r8.dex.b.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:28)
    at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:25)
    at com.android.tools.r8.D8.d(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:609)
    at com.android.tools.r8.D8.c(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:1)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:24)
    ... 5 more
 

romario87027

Active Member
Licensed User
Longtime User

Attachments

  • Screenshot_2.jpg
    Screenshot_2.jpg
    93.5 KB · Views: 68
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Both my tutorial and also Star-Dust library should easily connect to MSSQL database. With my solution wither the library in the link I provide or an older library should work perfectly fine. Give both the solution below a go.


 
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
Both my tutorial and also Star-Dust library should easily connect to MSSQL database. With my solution wither the library in the link I provide or an older library should work perfectly fine. Give both the solution below a go.


 
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
Noone can help you with the infomation you provided.

Try to give more information. Upload a small project showing the issue.
B4X:
Ricerca librerie che necessitano di essere "dexed".    (0.00s)
Dex code    (1.27s)
Dex merge    Error
Error in C:\android\tools\..\extras\b4a_local\unpacked-mssql-63487362270000\dex_v1\mssql.zip:classes.dex:
Type com.tomlost.MSSQL.MSSQL is defined multiple times: C:\android\tools\..\extras\b4a_local\unpacked-mssql-63487362270000\dex_v1\mssql.zip:classes.dex, C:\Users\Roberto\source\repos\ServerTerminalino\provamssql\TestMSSQL\B4A\Objects\dexed\com\tomlost\MSSQL\MSSQL.dex
Compilation failed
Just insert the MSSQL library and MSSQL module to see the error. Thanks for your help
 

Attachments

  • TestMSSQL.zip
    11.5 KB · Views: 58
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Just insert the MSSQL library and MSSQL module to see the error. Thanks for your help
??????????

I have mssql library added.
- To export a b4xpages-project you need to use the command in mainpage. File-Export as zip does not work for b4xpages-projects
- There are no methods like setDatabase
- You are not initializing the mssql-library at all
- there is no databasename defined

The mssql-module is using unuseable code. No one of the db. Methods are available.

I gave up. I can not work with your project.
 
Last edited:
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
??????????

I have mssql library added.
- To export a b4xpages-project you need to use the command in mainpage. File-Export as zip does not work for b4xpages-projects
- There are no methods like setDatabase
- You are not initializing the mssql-library at all
- there is no databasename defined

The mssql-module is using unuseable code. No one of the db. Methods are available.

I gave up. I can not work with your project.
 
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
ok, so as not to send the whole project that I don't want to modify with B4a V. 9.20. I create a simple program with the library and then compile it with B4a 12.20..
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I don't want to modify with B4a V. 9.20. I create a simple program with the library and then compile it with B4a 12.20
Note that the SDK has changed between 9.2 and 12.2! The old SDK isn´t compatible any longer.

- Delete B4A and the SDK.
- Install them both new based on the installation instructions:
 
Upvote 0

romario87027

Active Member
Licensed User
Longtime User
Note that the SDK has changed between 9.2 and 12.2! The old SDK isn´t compatible any longer.

- Delete B4A and the SDK.
- Install them both new based on the installation instructions:
the problem is easy to see, with the MYSQL library there is an error, without the library everything is ok. You can see it from the image.
 

Attachments

  • Screenshot_1.jpg
    Screenshot_1.jpg
    254.5 KB · Views: 54
  • Screenshot_2.jpg
    Screenshot_2.jpg
    384.7 KB · Views: 47
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
1. Don´t use the Emulator; use a real Device
2. You should post the stacktrace as text and not as image.
3. Have you deleted the old sdk-folder completely before you installed it?

Away from that i can not further help. I never used any MSSQL-Library but i´m sure @Peter Simpson suggestion in #7 should work.
 
Upvote 0
Top