Android Question Error compiling after latest Sdk update

samannnn

Member
I have updated SDK yesterday,
today i've tryed compile Apk, before sdk update it's compile right.

Now i have this error :

B4X:
B4A Version: 10.60
Parsing code.    (0.15s)
    Java Version: 11
Building folders structure.    (0.04s)
Compiling code.    (0.17s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.08s)
    (AndroidX SDK)
Generating R file.    (0.00s)
Compiling generated Java code.    (0.09s)
Convert byte code - optimized dex.    Error
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
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 find that when i add this line, b4a cant compile and without this line it can compile
B4X:
#AdditionalJar: com.google.firebase:firebase-crashlytics

manifest is:
B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
 

Erel

Administrator
Staff member
Licensed User
Upvote 0

samannnn

Member
thank you for your reply. the problem was:

B4X:
B4A Version: 10.90 BETA #1
Parsing code.    (0.19s)
    Java Version: 11
Building folders structure.    (0.02s)
Compiling code.    (0.17s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.38s)
Linking resources    (3.21s)
Compiling generated Java code.    (9.49s)
Convert byte code - optimized dex.    Error
trouble writing output: Too many method references to fit in one dex file: 67268; 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
    37 android.animation
   472 android.app
    36 android.app.job
     2 android.appwidget
   218 android.content
    75 android.content.pm
    75 android.content.res
    64 android.database
    26 android.database.sqlite
   248 android.graphics
   121 android.graphics.drawable
     3 android.graphics.drawable.shapes
    13 android.graphics.fonts
     3 android.graphics.pdf
     9 android.hardware
     5 android.hardware.display
    11 android.hardware.fingerprint
     2 android.icu.text
     3 android.icu.util
    34 android.location
   240 android.media
    18 android.media.browse
    97 android.media.session
    68 android.net
     2 android.net.ssl
     3 android.net.wifi
    43 android.opengl
   328 android.os
     1 android.preference
    28 android.print
     5 android.print.pdf
    14 android.provider
    12 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
   931 android.support.v4.media.session
    33 android.support.v4.os
     3 android.system
    56 android.telephony
     3 android.telephony.gsm
     2 android.telephony.mbms
    86 android.text
     1 android.text.format
     4 android.text.method
    15 android.text.style
    10 android.text.util
    18 android.transition
   121 android.util
   677 android.view
   258 android.view.accessibility
    71 android.view.animation
    14 android.view.inputmethod
   141 android.webkit
   496 android.widget
    73 androidx.activity
    54 androidx.annotation
     2 androidx.appcompat.widget
    26 androidx.arch.core.executor
    53 androidx.arch.core.internal
     1 androidx.arch.core.util
    20 androidx.asynclayoutinflater.view
    15 androidx.browser
    55 androidx.browser.browseractions
   129 androidx.browser.customtabs
   307 androidx.collection
    15 androidx.coordinatorlayout
   220 androidx.coordinatorlayout.widget
    15 androidx.core
     6 androidx.core.accessibilityservice
   788 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
    26 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
   337 androidx.core.widget
    66 androidx.cursoradapter.widget
    17 androidx.customview.view
   151 androidx.customview.widget
    95 androidx.documentfile.provider
    15 androidx.drawerlayout
   177 androidx.drawerlayout.widget
    15 androidx.fragment
  1045 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
   392 androidx.media
    31 androidx.media.app
    15 androidx.media.session
    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
    15 androidx.swiperefreshlayout
   256 androidx.swiperefreshlayout.widget
   240 androidx.versionedparcelable
   281 androidx.viewpager.widget
   407 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
    63 anywheresoftware.b4a.admobwrapper
    66 anywheresoftware.b4a.agraham.reflection
     1 anywheresoftware.b4a.debug
    29 anywheresoftware.b4a.inappbilling3
   279 anywheresoftware.b4a.keywords
    12 anywheresoftware.b4a.keywords.constants
  1128 anywheresoftware.b4a.objects
    89 anywheresoftware.b4a.objects.collections
   110 anywheresoftware.b4a.objects.drawable
    81 anywheresoftware.b4a.objects.streams
   255 anywheresoftware.b4a.phone
   152 anywheresoftware.b4a.randomaccessfile
    30 anywheresoftware.b4a.remotelogger
    65 anywheresoftware.b4h.okhttp
    29 anywheresoftware.b4j.object
     9 com.android.builder.model
     7 com.android.tools.lint.client.api
    31 com.android.tools.lint.detector.api
    23 com.android.vending.billing
    29 com.google.ads
   134 com.google.ads.consent
    76 com.google.ads.mediation
     2 com.google.ads.mediation.admob
    39 com.google.ads.mediation.customevent
    37 com.google.android.datatransport
     1 com.google.android.datatransport.backend.cct
    40 com.google.android.datatransport.cct
   258 com.google.android.datatransport.cct.internal
   173 com.google.android.datatransport.runtime
    82 com.google.android.datatransport.runtime.backends
     8 com.google.android.datatransport.runtime.dagger
   105 com.google.android.datatransport.runtime.dagger.internal
     4 com.google.android.datatransport.runtime.dagger.multibindings
     9 com.google.android.datatransport.runtime.logging
     4 com.google.android.datatransport.runtime.retries
    32 com.google.android.datatransport.runtime.scheduling
   121 com.google.android.datatransport.runtime.scheduling.jobscheduling
   246 com.google.android.datatransport.runtime.scheduling.persistence
     3 com.google.android.datatransport.runtime.synchronization
    28 com.google.android.datatransport.runtime.time
     4 com.google.android.datatransport.runtime.util
     4 com.google.android.gms.actions
   298 com.google.android.gms.ads
    35 com.google.android.gms.ads.admanager
    12 com.google.android.gms.ads.appopen
   130 com.google.android.gms.ads.formats
    10 com.google.android.gms.ads.h5
    25 com.google.android.gms.ads.identifier
    15 com.google.android.gms.ads.impl
    10 com.google.android.gms.ads.initialization
   165 com.google.android.gms.ads.internal
     6 com.google.android.gms.ads.internal.offline.buffering
   119 com.google.android.gms.ads.internal.overlay
   450 com.google.android.gms.ads.internal.util
    11 com.google.android.gms.ads.interstitial
   160 com.google.android.gms.ads.mediation
     2 com.google.android.gms.ads.mediation.admob
    66 com.google.android.gms.ads.mediation.customevent
    19 com.google.android.gms.ads.mediation.rtb
   140 com.google.android.gms.ads.nativead
   102 com.google.android.gms.ads.nonagon.signalgeneration
    27 com.google.android.gms.ads.query
    33 com.google.android.gms.ads.rewarded
    17 com.google.android.gms.ads.rewardedinterstitial
   103 com.google.android.gms.ads.search
    83 com.google.android.gms.auth.api.signin
    26 com.google.android.gms.auth.api.signin.internal
    15 com.google.android.gms.base
   319 com.google.android.gms.common
   289 com.google.android.gms.common.api
   919 com.google.android.gms.common.api.internal
    23 com.google.android.gms.common.config
   137 com.google.android.gms.common.data
    71 com.google.android.gms.common.images
   537 com.google.android.gms.common.internal
   160 com.google.android.gms.common.internal.safeparcel
    44 com.google.android.gms.common.internal.service
    14 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
   211 com.google.android.gms.common.server.response
    10 com.google.android.gms.common.sqlite
    39 com.google.android.gms.common.stats
   162 com.google.android.gms.common.util
     8 com.google.android.gms.common.util.concurrent
    15 com.google.android.gms.common.wrappers
   205 com.google.android.gms.dynamic
    59 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
    48 com.google.android.gms.flags
    18 com.google.android.gms.flags.impl
23137 com.google.android.gms.internal.ads
    22 com.google.android.gms.internal.ads_identifier
    70 com.google.android.gms.internal.base
   127 com.google.android.gms.internal.common
   292 com.google.android.gms.internal.consent_sdk
    95 com.google.android.gms.internal.crash
    19 com.google.android.gms.internal.firebase-iid
    17 com.google.android.gms.internal.flags
  2911 com.google.android.gms.internal.measurement
    14 com.google.android.gms.internal.stats
     2 com.google.android.gms.internal.tasks
    72 com.google.android.gms.measurement
    32 com.google.android.gms.measurement.api
  1647 com.google.android.gms.measurement.internal
    12 com.google.android.gms.security
    17 com.google.android.gms.signin
    54 com.google.android.gms.signin.internal
    18 com.google.android.gms.stats
   196 com.google.android.gms.tasks
    40 com.google.android.ump
     5 com.google.common.util.concurrent
   101 com.google.firebase
    51 com.google.firebase.analytics
    38 com.google.firebase.analytics.connector
    37 com.google.firebase.analytics.connector.internal
   150 com.google.firebase.components
    75 com.google.firebase.crash
     5 com.google.firebase.crash.component
    36 com.google.firebase.crashlytics
    71 com.google.firebase.crashlytics.internal
    14 com.google.firebase.crashlytics.internal.analytics
     4 com.google.firebase.crashlytics.internal.breadcrumbs
   539 com.google.firebase.crashlytics.internal.common
    83 com.google.firebase.crashlytics.internal.log
   719 com.google.firebase.crashlytics.internal.model
    62 com.google.firebase.crashlytics.internal.model.serialization
    22 com.google.firebase.crashlytics.internal.ndk
    24 com.google.firebase.crashlytics.internal.network
    70 com.google.firebase.crashlytics.internal.persistence
   196 com.google.firebase.crashlytics.internal.proto
    20 com.google.firebase.crashlytics.internal.report
    31 com.google.firebase.crashlytics.internal.report.model
    17 com.google.firebase.crashlytics.internal.report.network
    14 com.google.firebase.crashlytics.internal.send
    61 com.google.firebase.crashlytics.internal.settings
    20 com.google.firebase.crashlytics.internal.settings.model
    23 com.google.firebase.crashlytics.internal.settings.network
    11 com.google.firebase.crashlytics.internal.stacktrace
     3 com.google.firebase.crashlytics.internal.unity
     3 com.google.firebase.emulators
    34 com.google.firebase.encoders
     3 com.google.firebase.encoders.annotations
     3 com.google.firebase.encoders.config
    80 com.google.firebase.encoders.json
     9 com.google.firebase.events
    22 com.google.firebase.heartbeatinfo
   382 com.google.firebase.iid
     2 com.google.firebase.iid.internal
     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
     7 com.google.firebase.internal
    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
     5 dalvik.system
   137 de.amberhome.viewpager
   230 de.amberhome.viewpager.internal
     4 default
    82 flm.b4a.animationplus
   241 java.io
   472 java.lang
     1 java.lang.annotation
     6 java.lang.ref
    56 java.lang.reflect
    36 java.math
   121 java.net
    75 java.nio
    21 java.nio.channels
     6 java.nio.charset
     2 java.nio.file
    50 java.security
    37 java.security.cert
     4 java.security.interfaces
    21 java.security.spec
     3 java.sql
    37 java.text
     1 java.time
   486 java.util
   148 java.util.concurrent
    43 java.util.concurrent.atomic
    14 java.util.concurrent.locks
     7 java.util.logging
    29 java.util.regex
    35 java.util.zip
    27 javax.crypto
     5 javax.crypto.spec
     2 javax.inject
    12 javax.microedition.khronos.egl
     2 javax.net
    94 javax.net.ssl
     3 javax.security.auth.x500
     6 kotlin
     9 kotlin.collections
     2 kotlin.jvm.functions
     6 kotlin.jvm.internal
     2 kotlin.sequences
     8 kotlin.text
     4 libcore.io
   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
    33 org.jetbrains.uast
     1 org.jetbrains.uast.kotlin
     2 org.jetbrains.uast.visitor
    60 org.json
     7 org.w3c.dom
    14 org.xmlpull.v1
    12 sun.misc

i add one more line:
B4X:
#MultiDex: True
Now i can compile successfully.
 
Last edited:
Upvote 0
Top