Gabino A. de la Gala Well-Known Member Licensed User Longtime User Jan 22, 2021 #1 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 Code: Copy ** 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
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 Code: Copy ** 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 Jan 22, 2021 #2 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: B4A – The simple way to develop native Android apps B4A includes all the features needed to quickly develop any type of Android app. B4A is used by tens of thousands of developers from all over the world, including companies such as NASA, HP, IBM and others. www.b4x.com Upvote 0
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: B4A – The simple way to develop native Android apps B4A includes all the features needed to quickly develop any type of Android app. B4A is used by tens of thousands of developers from all over the world, including companies such as NASA, HP, IBM and others. www.b4x.com
aeric Expert Licensed User Longtime User Jan 23, 2021 #3 I guess it is related to Android support or appcompat. Also try click at menu Tools -> Jetifier (AndroidX) Upvote 0
I guess it is related to Android support or appcompat. Also try click at menu Tools -> Jetifier (AndroidX)
M MikeSW17 Active Member Licensed User Longtime User Jan 23, 2021 #4 When installing B4A 10.5 (or any later version), remember to update BOTH Android SDK Command line tools and required resources Upvote 0
When installing B4A 10.5 (or any later version), remember to update BOTH Android SDK Command line tools and required resources
Gabino A. de la Gala Well-Known Member Licensed User Longtime User Jan 23, 2021 #5 MikeSW17 said: When installing B4A 10.5 (or any later version), remember to update BOTH Android SDK Command line tools and required resources Click to expand... All of this already done. I think is something about the proper library. Upvote 0
MikeSW17 said: When installing B4A 10.5 (or any later version), remember to update BOTH Android SDK Command line tools and required resources Click to expand... All of this already done. I think is something about the proper library.
M MikeSW17 Active Member Licensed User Longtime User Jan 23, 2021 #6 Can you upload a cut-down or example project that shows the problem? Upvote 0
Gabino A. de la Gala Well-Known Member Licensed User Longtime User Jan 23, 2021 #7 MikeSW17 said: Can you upload a cut-down or example project that shows the problem? Click to expand... The solution was in this post: https://www.b4x.com/android/forum/threads/kingsmentor-mobilevisionbarcodescanner.97010/#post-693757 Changing values in the xml file. Upvote 0
MikeSW17 said: Can you upload a cut-down or example project that shows the problem? Click to expand... The solution was in this post: https://www.b4x.com/android/forum/threads/kingsmentor-mobilevisionbarcodescanner.97010/#post-693757 Changing values in the xml file.