Android Question Problems with MobileVisionBarcodeScanner compiled with recent B4A version

Gabino A. de la Gala

Active Member
Licensed User
Longtime User
After updating the B4A version to version 10.2 and inserting the corresponding SDK (resources_9_20.zip) I have found that I am not able to make an old application that uses the MobileVisionBarcodeScanner library work correctly.

Is there a way to make it work again?

Attached log with the error that appears when I peak at the button that launches the call to the scan window: mvbs.Start_MVBarcodeScanner

Log::
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
EditTextActivo: EditCodigo
*** Service (wedgeservice) Create ***
BroadcastReceiver has been initialized.
** Service (wedgeservice) Start **
** Activity (main) Pause, UserClosed = false **
java.lang.RuntimeException: Unable to start activity ComponentInfo{epai.inventarios/xyz.belvi.mobilevisionbarcodesample.MainActivity}: android.view.InflateException: Binary XML file line #43 in epai.inventarios:layout/activity_main: Binary XML file line #43 in epai.inventarios:layout/activity_main: Error inflating class android.support.v7.widget.SwitchCompat
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3326)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3465)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2069)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: android.view.InflateException: Binary XML file line #43 in epai.inventarios:layout/activity_main: Binary XML file line #43 in epai.inventarios:layout/activity_main: Error inflating class android.support.v7.widget.SwitchCompat
Caused by: android.view.InflateException: Binary XML file line #43 in epai.inventarios:layout/activity_main: Error inflating class android.support.v7.widget.SwitchCompat
Caused by: java.lang.ClassNotFoundException: android.support.v7.widget.SwitchCompat
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:454)
    at android.view.LayoutInflater.createView(LayoutInflater.java:815)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1010)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1140)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1101)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1143)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1101)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1143)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1101)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
    at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
    at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
    at xyz.belvi.mobilevisionbarcodesample.MainActivity.onCreate(MainActivity.java:59)
    at android.app.Activity.performCreate(Activity.java:7817)
    at android.app.Activity.performCreate(Activity.java:7806)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3301)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3465)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2069)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: java.lang.ClassNotFoundException: android.support
 

kisoft

Well-Known Member
Licensed User
Longtime User
I don't know if it will help you, but the latest version of B4A is 10.50... maybe it's worth trying to install the latest version according to this tutorial:
 
Upvote 0
Top