Android Question optimized dex error

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Yesterday I upgrade to AndroidX sdk and follow instructions, Now I can't compile my project!!! I got this error:
B4X:
B4A Version: 9.50
Java Version: 8
Parsing code.    (0.96s)
Building folders structure.    (0.74s)
Running custom action.    (12.66s)
Compiling code.    (1.87s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.24s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    (7.51s)
Compiling generated Java code.    (26.26s)
Convert byte code - optimized dex.    Error
trouble writing output: Too many method references to fit in one dex file: 68456; 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
     5 android.accounts
    75 android.animation
   451 android.app
    17 android.app.job
     2 android.appwidget
   235 android.content
    57 android.content.pm
   111 android.content.res
    76 android.database
    25 android.database.sqlite
   254 android.graphics
   137 android.graphics.drawable
     3 android.graphics.drawable.shapes
     1 android.graphics.fonts
    11 android.graphics.pdf
    16 android.hardware
     3 android.hardware.display
    11 android.hardware.fingerprint
     2 android.icu.text
    38 android.location
   226 android.media
    18 android.media.browse
    99 android.media.session
    57 android.net
     2 android.net.http
    36 android.opengl
   310 android.os
     8 android.preference
    44 android.print
     5 android.print.pdf
    13 android.provider
     8 android.renderscript
     2 android.security
    11 android.service.media
    70 android.support.customtabs
    25 android.support.v4.app
     2 android.support.v4.content
     2 android.support.v4.graphics
     7 android.support.v4.graphics.drawable
   338 android.support.v4.media
  1090 android.support.v4.media.session
    28 android.support.v4.os
     4 android.support.v4.print
    20 android.support.v4.view
     1 android.support.v4.widget
    20 android.support.v7.app
     8 android.support.v7.view
    55 android.support.v7.widget
     3 android.system
    17 android.telephony
    96 android.text
     1 android.text.format
     6 android.text.method
    15 android.text.style
    10 android.text.util
    18 android.transition
   120 android.util
   784 android.view
   249 android.view.accessibility
    61 android.view.animation
    14 android.view.inputmethod
   106 android.webkit
   792 android.widget
    54 androidx.annotation
    14 androidx.appcompat
   887 androidx.appcompat.app
    10 androidx.appcompat.content.res
   328 androidx.appcompat.graphics.drawable
     3 androidx.appcompat.text
   154 androidx.appcompat.view
   732 androidx.appcompat.view.menu
  2390 androidx.appcompat.widget
    25 androidx.arch.core.executor
    53 androidx.arch.core.internal
     1 androidx.arch.core.util
    20 androidx.asynclayoutinflater.view
    14 androidx.browser
    55 androidx.browser.browseractions
   129 androidx.browser.customtabs
   307 androidx.collection
    14 androidx.coordinatorlayout
   217 androidx.coordinatorlayout.widget
    14 androidx.core
     6 androidx.core.accessibilityservice
   707 androidx.core.app
    68 androidx.core.content
    32 androidx.core.content.pm
   101 androidx.core.content.res
     5 androidx.core.database
     2 androidx.core.database.sqlite
   139 androidx.core.graphics
   186 androidx.core.graphics.drawable
     6 androidx.core.hardware.display
    27 androidx.core.hardware.fingerprint
    88 androidx.core.internal.view
     4 androidx.core.math
    30 androidx.core.net
   127 androidx.core.os
    86 androidx.core.provider
   119 androidx.core.text
    35 androidx.core.text.util
    70 androidx.core.util
   533 androidx.core.view
   289 androidx.core.view.accessibility
    10 androidx.core.view.animation
    43 androidx.core.view.inputmethod
   325 androidx.core.widget
    70 androidx.cursoradapter.widget
    17 androidx.customview.view
   146 androidx.customview.widget
    95 androidx.documentfile.provider
   170 androidx.drawerlayout.widget
   935 androidx.fragment.app
    11 androidx.interpolator.view.animation
    30 androidx.legacy.app
     4 androidx.legacy.content
    11 androidx.legacy.widget
   191 androidx.lifecycle
    62 androidx.loader.app
   138 androidx.loader.content
    13 androidx.localbroadcastmanager.content
   370 androidx.media
    31 androidx.media.app
    15 androidx.media.session
    48 androidx.print
   117 androidx.slidingpanelayout.widget
   230 androidx.swiperefreshlayout.widget
   323 androidx.vectordrawable.graphics.drawable
   219 androidx.versionedparcelable
   279 androidx.viewpager.widget
    23 anyhwheresoftware.b4a.objects.sqlcipher
   217 anywheresoftware.b4a
    91 anywheresoftware.b4a.admobwrapper
    89 anywheresoftware.b4a.agraham.bignumbers
    25 anywheresoftware.b4a.agraham.byteconverter
   276 anywheresoftware.b4a.agraham.dialogs
    71 anywheresoftware.b4a.agraham.encryption
    66 anywheresoftware.b4a.agraham.reflection
     1 anywheresoftware.b4a.debug
    54 anywheresoftware.b4a.gps
   279 anywheresoftware.b4a.keywords
    14 anywheresoftware.b4a.keywords.constants
    12 anywheresoftware.b4a.object
  1426 anywheresoftware.b4a.objects
    89 anywheresoftware.b4a.objects.collections
   110 anywheresoftware.b4a.objects.drawable
    81 anywheresoftware.b4a.objects.streams
   254 anywheresoftware.b4a.phone
   150 anywheresoftware.b4a.randomaccessfile
    30 anywheresoftware.b4a.remotelogger
    55 anywheresoftware.b4a.sql
    65 anywheresoftware.b4h.okhttp
    26 anywheresoftware.b4j.object
   224 b4a.example
    55 b4a.example3
     5 b4a.util
    13 com.AB.ABZxing
    83 com.astuetz
    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
   242 com.google.android.gms.ads
    96 com.google.android.gms.ads.doubleclick
   244 com.google.android.gms.ads.formats
    32 com.google.android.gms.ads.identifier
    14 com.google.android.gms.ads.impl
    81 com.google.android.gms.ads.internal
   111 com.google.android.gms.ads.internal.overlay
   195 com.google.android.gms.ads.mediation
     2 com.google.android.gms.ads.mediation.admob
    64 com.google.android.gms.ads.mediation.customevent
     9 com.google.android.gms.ads.mediation.rtb
    32 com.google.android.gms.ads.reward
    17 com.google.android.gms.ads.reward.mediation
    36 com.google.android.gms.ads.rewarded
   122 com.google.android.gms.ads.search
    81 com.google.android.gms.auth.api.signin
    28 com.google.android.gms.auth.api.signin.internal
    14 com.google.android.gms.base
   235 com.google.android.gms.common
   282 com.google.android.gms.common.api
   930 com.google.android.gms.common.api.internal
    29 com.google.android.gms.common.config
   142 com.google.android.gms.common.data
    82 com.google.android.gms.common.images
   549 com.google.android.gms.common.internal
   152 com.google.android.gms.common.internal.safeparcel
    28 com.google.android.gms.common.internal.service
    12 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
   209 com.google.android.gms.common.server.response
    10 com.google.android.gms.common.sqlite
    40 com.google.android.gms.common.stats
   176 com.google.android.gms.common.util
    10 com.google.android.gms.common.util.concurrent
    16 com.google.android.gms.common.wrappers
   205 com.google.android.gms.dynamic
    65 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.flags
     1 com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite
    53 com.google.android.gms.flags
    22 com.google.android.gms.flags.impl
 16601 com.google.android.gms.internal.ads
    19 com.google.android.gms.internal.ads_identifier
    71 com.google.android.gms.internal.base
    30 com.google.android.gms.internal.common
    95 com.google.android.gms.internal.crash
    50 com.google.android.gms.internal.firebase_messaging
  2467 com.google.android.gms.internal.firebase_remote_config
    18 com.google.android.gms.internal.flags
   379 com.google.android.gms.internal.maps
  3225 com.google.android.gms.internal.measurement
   625 com.google.android.gms.maps
   556 com.google.android.gms.maps.internal
   542 com.google.android.gms.maps.model
    94 com.google.android.gms.measurement
    29 com.google.android.gms.measurement.api
  2094 com.google.android.gms.measurement.internal
     4 com.google.android.gms.measurement.module
    13 com.google.android.gms.security
    23 com.google.android.gms.signin
    67 com.google.android.gms.signin.internal
    18 com.google.android.gms.stats
   194 com.google.android.gms.tasks
     2 com.google.auto.value
   100 com.google.firebase
    29 com.google.firebase.abt
    10 com.google.firebase.abt.component
    49 com.google.firebase.analytics
    38 com.google.firebase.analytics.connector
    35 com.google.firebase.analytics.connector.internal
   144 com.google.firebase.components
    74 com.google.firebase.crash
     5 com.google.firebase.crash.component
     9 com.google.firebase.events
   292 com.google.firebase.iid
     2 com.google.firebase.iid.internal
     1 com.google.firebase.inject
     5 com.google.firebase.internal
   141 com.google.firebase.messaging
    26 com.google.firebase.platforminfo
    10 com.google.firebase.provider
   130 com.google.firebase.remoteconfig
   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
  1886 com.google.protobuf
   301 com.jeremyfeinstein.slidingmenu.lib
   103 com.jeremyfeinstein.slidingmenu.lib.app
    13 com.palmosoft.palmohtmltopdf
  2316 com.yet.youmetee3
   102 com.yet.youmetee3.designerscripts
     4 dalvik.system
   517 de.amberhome.objects.appcompat
    54 de.amberhome.objects.appcompat.internal
   117 de.donmanfred
    60 de.hdodenhof.circleimageview
     6 default
   294 developers.mobile.abt
   160 flm.b4a.scrollview2d
   220 java.io
   452 java.lang
     8 java.lang.ref
    59 java.lang.reflect
    87 java.math
   143 java.net
    90 java.nio
    20 java.nio.channels
     8 java.nio.charset
     2 java.nio.file
    50 java.security
    14 java.security.cert
     4 java.security.interfaces
    20 java.security.spec
     3 java.sql
    41 java.text
   417 java.util
   131 java.util.concurrent
    36 java.util.concurrent.atomic
    16 java.util.concurrent.locks
     7 java.util.logging
    26 java.util.regex
    37 java.util.zip
    32 javax.crypto
     5 javax.crypto.spec
    12 javax.microedition.khronos.egl
     2 javax.net
    90 javax.net.ssl
     3 javax.security.auth.x500
    11 jp
    29 jp.bassaer.chatmessageview.models
     4 jp.bassaer.chatmessageview.utils
    77 jp.bassaer.chatmessageview.views
    16 jp.bassaer.chatmessageview.views.adapters
     4 libcore.io
   404 net.sqlcipher
   375 net.sqlcipher.database
   720 okhttp3
    57 okhttp3.internal
    93 okhttp3.internal.cache
    17 okhttp3.internal.cache2
    66 okhttp3.internal.connection
    73 okhttp3.internal.http
    45 okhttp3.internal.http1
   287 okhttp3.internal.http2
   197 okhttp3.internal.huc
    18 okhttp3.internal.io
    61 okhttp3.internal.platform
    39 okhttp3.internal.tls
    73 okhttp3.internal.ws
   588 okio
     9 org.apache.http
     1 org.apache.http.conn
     3 org.apache.http.entity
     5 org.apache.http.message
    55 org.json
    15 org.xmlpull.v1
    23 sun.misc
     6 uk.co.martinpearman.b4a.android.app
    10 uk.co.martinpearman.b4a.android.graphics
    94 uk.co.martinpearman.b4a.com.google.android.gms.maps
    40 uk.co.martinpearman.b4a.com.google.android.gms.maps.googlemap
   312 uk.co.martinpearman.b4a.com.google.android.gms.maps.model
    44 uk.co.martinpearman.b4a.googlemapsextras
     9 uk.co.martinpearman.java.android.app
Help please
 
Top