Android Question You may try using multi-dex

D

Deleted member 103

Guest
Hi,

after a year I would like to update an app, unfortunately I have an error when compiling and I can't get any further.
When compiling I get this error message:
B4A Version: 10.2
Java Version: 8
Parsing code. (0.13s)
Building folders structure. (0.02s)
Compiling code. (0.33s)
Compiling layouts code. (0.07s)
Organizing libraries. (3.54s)
(AndroidX SDK)
Generating R file. (1.57s)
Compiling generated Java code. (4.61s)
Convert byte code - optimized dex. Error
trouble writing output: Too many method references to fit in one dex file: 72720; max is 65536.
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.
References by package:
4 android.accessibilityservice
6 android.accounts
72 android.animation
496 android.app
36 android.app.job
2 android.appwidget
235 android.content
80 android.content.pm
112 android.content.res
68 android.database
27 android.database.sqlite
252 android.graphics
138 android.graphics.drawable
3 android.graphics.drawable.shapes
13 android.graphics.fonts
3 android.graphics.pdf
8 android.hardware
3 android.hardware.display
11 android.hardware.fingerprint
2 android.icu.text
3 android.icu.util
8 android.location
207 android.media
18 android.media.browse
102 android.media.session
68 android.net
2 android.net.http
2 android.net.ssl
36 android.opengl
329 android.os
20 android.preference
28 android.print
5 android.print.pdf
13 android.provider
8 android.renderscript
2 android.security
11 android.service.media
70 android.support.customtabs
27 android.support.v4.app
3 android.support.v4.graphics.drawable
298 android.support.v4.media
1006 android.support.v4.media.session
33 android.support.v4.os
3 android.system
17 android.telephony
2 android.telephony.mbms
108 android.text
1 android.text.format
5 android.text.method
16 android.text.style
10 android.text.util
18 android.transition
120 android.util
810 android.view
259 android.view.accessibility
51 android.view.animation
16 android.view.inputmethod
1 android.view.textclassifier
107 android.webkit
840 android.widget
73 androidx.activity
54 androidx.annotation
39 androidx.appcompat
937 androidx.appcompat.app
10 androidx.appcompat.content.res
328 androidx.appcompat.graphics.drawable
28 androidx.appcompat.res
16 androidx.appcompat.resources
3 androidx.appcompat.text
155 androidx.appcompat.view
724 androidx.appcompat.view.menu
2591 androidx.appcompat.widget
26 androidx.arch.core.executor
53 androidx.arch.core.internal
1 androidx.arch.core.util
20 androidx.asynclayoutinflater.view
16 androidx.browser
55 androidx.browser.browseractions
129 androidx.browser.customtabs
307 androidx.collection
16 androidx.coordinatorlayout
220 androidx.coordinatorlayout.widget
16 androidx.core
6 androidx.core.accessibilityservice
790 androidx.core.app
72 androidx.core.content
66 androidx.core.content.pm
111 androidx.core.content.res
5 androidx.core.database
2 androidx.core.database.sqlite
179 androidx.core.graphics
187 androidx.core.graphics.drawable
6 androidx.core.hardware.display
27 androidx.core.hardware.fingerprint
90 androidx.core.internal.view
2 androidx.core.location
5 androidx.core.math
32 androidx.core.net
108 androidx.core.os
87 androidx.core.provider
2 androidx.core.telephony.mbms
118 androidx.core.text
35 androidx.core.text.util
59 androidx.core.util
723 androidx.core.view
339 androidx.core.view.accessibility
10 androidx.core.view.animation
44 androidx.core.view.inputmethod
342 androidx.core.widget
70 androidx.cursoradapter.widget
17 androidx.customview.view
151 androidx.customview.widget
95 androidx.documentfile.provider
16 androidx.drawerlayout
177 androidx.drawerlayout.widget
16 androidx.fragment
1053 androidx.fragment.app
84 androidx.fragment.lint
11 androidx.interpolator.view.animation
30 androidx.legacy.app
4 androidx.legacy.content
11 androidx.legacy.widget
278 androidx.lifecycle
62 androidx.loader.app
122 androidx.loader.content
13 androidx.localbroadcastmanager.content
402 androidx.media
31 androidx.media.app
15 androidx.media.session
1 androidx.media.utils
48 androidx.print
35 androidx.room
1 androidx.room.migration
12 androidx.room.util
25 androidx.savedstate
119 androidx.slidingpanelayout.widget
20 androidx.sqlite.db
2 androidx.sqlite.db.framework
16 androidx.swiperefreshlayout
256 androidx.swiperefreshlayout.widget
322 androidx.vectordrawable.graphics.drawable
240 androidx.versionedparcelable
279 androidx.viewpager.widget
408 androidx.work
228 androidx.work.impl
19 androidx.work.impl.background.greedy
96 androidx.work.impl.background.systemalarm
30 androidx.work.impl.background.systemjob
19 androidx.work.impl.constraints
41 androidx.work.impl.constraints.controllers
62 androidx.work.impl.constraints.trackers
3 androidx.work.impl.diagnostics
50 androidx.work.impl.foreground
242 androidx.work.impl.model
146 androidx.work.impl.utils
78 androidx.work.impl.utils.futures
11 androidx.work.impl.utils.taskexecutor
31 androidx.work.impl.workers
99 androidx.work.lint
211 anywheresoftware.b4a
93 anywheresoftware.b4a.admobwrapper
276 anywheresoftware.b4a.agraham.dialogs
66 anywheresoftware.b4a.agraham.reflection
1 anywheresoftware.b4a.debug
279 anywheresoftware.b4a.keywords
13 anywheresoftware.b4a.keywords.constants
1118 anywheresoftware.b4a.objects
89 anywheresoftware.b4a.objects.collections
110 anywheresoftware.b4a.objects.drawable
81 anywheresoftware.b4a.objects.streams
254 anywheresoftware.b4a.phone
47 anywheresoftware.b4a.sql
65 anywheresoftware.b4h.okhttp
26 anywheresoftware.b4j.object
9 com.android.builder.model
1 com.android.sdklib
9 com.android.tools.lint.client.api
41 com.android.tools.lint.detector.api
83 com.astuetz
56 com.crashlytics.android
302 com.crashlytics.android.answers
11 com.crashlytics.android.beta
755 com.crashlytics.android.core
1 com.crashlytics.android.ndk
30 com.google.ads
134 com.google.ads.consent
101 com.google.ads.mediation
2 com.google.ads.mediation.admob
40 com.google.ads.mediation.customevent
4 com.google.android.gms.actions
348 com.google.android.gms.ads
30 com.google.android.gms.ads.appopen
102 com.google.android.gms.ads.doubleclick
268 com.google.android.gms.ads.formats
32 com.google.android.gms.ads.identifier
16 com.google.android.gms.ads.impl
10 com.google.android.gms.ads.initialization
18 com.google.android.gms.ads.instream
159 com.google.android.gms.ads.internal
6 com.google.android.gms.ads.internal.offline.buffering
120 com.google.android.gms.ads.internal.overlay
464 com.google.android.gms.ads.internal.util
208 com.google.android.gms.ads.mediation
2 com.google.android.gms.ads.mediation.admob
69 com.google.android.gms.ads.mediation.customevent
11 com.google.android.gms.ads.mediation.rtb
10 com.google.android.gms.ads.nonagon.transaction.omid
27 com.google.android.gms.ads.query
33 com.google.android.gms.ads.reward
17 com.google.android.gms.ads.reward.mediation
40 com.google.android.gms.ads.rewarded
15 com.google.android.gms.ads.rewardedinterstitial
122 com.google.android.gms.ads.search
114 com.google.android.gms.auth
33 com.google.android.gms.auth.account
47 com.google.android.gms.auth.api
110 com.google.android.gms.auth.api.accounttransfer
159 com.google.android.gms.auth.api.credentials
93 com.google.android.gms.auth.api.identity
23 com.google.android.gms.auth.api.phone
34 com.google.android.gms.auth.api.proxy
138 com.google.android.gms.auth.api.signin
152 com.google.android.gms.auth.api.signin.internal
16 com.google.android.gms.base
312 com.google.android.gms.common
290 com.google.android.gms.common.api
944 com.google.android.gms.common.api.internal
29 com.google.android.gms.common.config
142 com.google.android.gms.common.data
78 com.google.android.gms.common.images
544 com.google.android.gms.common.internal
154 com.google.android.gms.common.internal.safeparcel
47 com.google.android.gms.common.internal.service
15 com.google.android.gms.common.logging
5 com.google.android.gms.common.providers
7 com.google.android.gms.common.server
28 com.google.android.gms.common.server.converter
210 com.google.android.gms.common.server.response
10 com.google.android.gms.common.sqlite
38 com.google.android.gms.common.stats
179 com.google.android.gms.common.util
10 com.google.android.gms.common.util.concurrent
14 com.google.android.gms.common.wrappers
205 com.google.android.gms.dynamic
74 com.google.android.gms.dynamite
1 com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite
1 com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite
19796 com.google.android.gms.internal.ads
19 com.google.android.gms.internal.ads_identifier
795 com.google.android.gms.internal.auth
132 com.google.android.gms.internal.auth-api
95 com.google.android.gms.internal.auth-api-phone
76 com.google.android.gms.internal.base
36 com.google.android.gms.internal.common
2868 com.google.android.gms.internal.firebase_auth
3641 com.google.android.gms.internal.measurement
3 com.google.android.gms.internal.tasks
88 com.google.android.gms.measurement
32 com.google.android.gms.measurement.api
2268 com.google.android.gms.measurement.internal
4 com.google.android.gms.measurement.module
15 com.google.android.gms.security
19 com.google.android.gms.signin
77 com.google.android.gms.signin.internal
18 com.google.android.gms.stats
203 com.google.android.gms.tasks
5 com.google.common.util.concurrent
101 com.google.firebase
44 com.google.firebase.analytics
38 com.google.firebase.analytics.connector
36 com.google.firebase.analytics.connector.internal
521 com.google.firebase.auth
2 com.google.firebase.auth.api
908 com.google.firebase.auth.api.internal
273 com.google.firebase.auth.internal
150 com.google.firebase.components
3 com.google.firebase.emulators
9 com.google.firebase.events
22 com.google.firebase.heartbeatinfo
1 com.google.firebase.inject
121 com.google.firebase.installations
1 com.google.firebase.installations.interop
11 com.google.firebase.installations.lint
80 com.google.firebase.installations.local
99 com.google.firebase.installations.remote
14 com.google.firebase.internal
1 com.google.firebase.internal.api
28 com.google.firebase.platforminfo
10 com.google.firebase.provider
309 com.google.gson
8 com.google.gson.annotations
292 com.google.gson.internal
332 com.google.gson.internal.bind
10 com.google.gson.internal.bind.util
11 com.google.gson.internal.reflect
20 com.google.gson.reflect
86 com.google.gson.stream
7 com.intellij.psi
1 com.intellij.psi.util
2 com.maximus.id
26 com.wrapp.floatlabelededittext
5 dalvik.system
516 de.amberhome.objects.appcompat
54 de.amberhome.objects.appcompat.internal
4 default
786 fg.Solitario_free
34 fg.Solitario_free.designerscripts
202 io.fabric.sdk.android
17 io.fabric.sdk.android.services.cache
273 io.fabric.sdk.android.services.common
162 io.fabric.sdk.android.services.concurrency
66 io.fabric.sdk.android.services.concurrency.internal
99 io.fabric.sdk.android.services.events
272 io.fabric.sdk.android.services.network
28 io.fabric.sdk.android.services.persistence
99 io.fabric.sdk.android.services.settings
233 java.io
452 java.lang
6 java.lang.ref
56 java.lang.reflect
35 java.math
113 java.net
66 java.nio
17 java.nio.channels
9 java.nio.charset
2 java.nio.file
53 java.security
39 java.security.cert
4 java.security.interfaces
20 java.security.spec
3 java.sql
35 java.text
1 java.time
429 java.util
162 java.util.concurrent
40 java.util.concurrent.atomic
15 java.util.concurrent.locks
6 java.util.logging
30 java.util.regex
34 java.util.zip
24 javax.crypto
4 javax.crypto.spec
12 javax.microedition.khronos.egl
2 javax.net
94 javax.net.ssl
3 javax.security.auth.x500
6 kotlin
10 kotlin.collections
2 kotlin.jvm.functions
6 kotlin.jvm.internal
2 kotlin.sequences
8 kotlin.text
779 okhttp3
66 okhttp3.internal
93 okhttp3.internal.cache
17 okhttp3.internal.cache2
75 okhttp3.internal.connection
91 okhttp3.internal.http
46 okhttp3.internal.http1
306 okhttp3.internal.http2
18 okhttp3.internal.io
95 okhttp3.internal.platform
3 okhttp3.internal.proxy
9 okhttp3.internal.publicsuffix
32 okhttp3.internal.tls
71 okhttp3.internal.ws
643 okio
11 org.conscrypt
1 org.jetbrains.kotlin.name
36 org.jetbrains.uast
1 org.jetbrains.uast.kotlin
2 org.jetbrains.uast.visitor
58 org.json
9 org.w3c.dom
15 org.xmlpull.v1
20 sun.misc
I never used the "#MultiDex: true" option.
If I use this option now, it will be compiled and installed on my mobile phone.
B4A Version: 10.2
Java Version: 8
Parsing code. (0.11s)
Building folders structure. (0.03s)
Compiling code. (0.34s)
Compiling layouts code. (0.09s)
Organizing libraries. (0.03s)
(AndroidX SDK)
Generating R file. (0.00s)
Compiling generated Java code. (0.11s)
Convert byte code - optimized dex. (42.75s)
Optimized dexer failed. Switching to Standard dexer.
Packaging files. (2.90s)
Copying libraries resources (0.26s)
Found 37 resource files.
Signing package file (private key). (2.04s)
ZipAlign file. (0.15s)
Running custom action. (0.15s)
Installing file to device. (5.18s)
Device serial: CTLGAP1890703438
Completed successfully.
When starting it crashes without an error message.
 

agraham

Expert
Licensed User
Longtime User
When starting it crashes without an error message.
If you have a Starter service try this

B4X:
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    ToastMessageShow(Error.Message, True)   
    LogColor("Application Error" & CRLF & Error.Message, Colors.Red)
    Return False
    'Return True   
End Sub
 
Upvote 0
D

Deleted member 103

Guest
Hi @agraham ,

I tried your tip, unfortunately it doesn't bring an error message.
When I start the app, I only see this picture.
1603369969200.png
 
Upvote 0
Top