Android Question [Solved] B4A 9.30 Beta 3 + New SDK + "error: cannot access SwitchCompat"

asales

Expert
Licensed User
Longtime User
I use the beta 3, installed a new SDK, but I get the error below when a tried to compile the app.

The switch component is from AppCompact library version 4.00.
The line from code is this:
B4X:
Switch.Initialize("Switch")
Switch.Checked = True
actionViewItem.ActionView = Switch  '<-- the compiler go to this line

Error in compile:
B4X:
B4A Version: 9.30 BETA #3
Java Version: 8
Parsing code.    (0.26s)
Building folders structure.    (0.15s)
Running custom action.    (0.15s)
Compiling code.    (0.38s)
    
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.11s)
Organizing libraries.    (3.81s)
    (AndroidX SDK)
Generating R file.    (3.89s)
Compiling generated Java code.    Error
B4A line: 1431
actionViewItem.ActionView = Switch
javac 1.8.0_92
src\br\com\as2\oracaododia\main.java:2519: error: cannot access SwitchCompat
_actionviewitem.setActionView((android.view.View)(mostCurrent._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.getObject()));
                                                                                                                               ^
class file for android.support.v7.widget.SwitchCompat not found
 

asales

Expert
Licensed User
Longtime User
The problem is the my all additional libraries was in the internal library folder and I don't see anything to jetifier. Move it, jetifier it and done. Thanks.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…