Android Question Maven artifact not found: androidx.customview/customview-poolingcontainer.

Mehrzad238

Active Member
After I tried to use Appcompat, I encountered this error:


B4X:
B4A Version: 13.40
Parsing code.    (0.33s)
    Java Version: 19
Building folders structure.    (0.46s)
Running custom action.    (0.06s)
Compiling code.    (0.41s)
Compiling layouts code.    (0.10s)
Organizing libraries.    Error
Maven artifact not found: androidx.customview/customview-poolingcontainer.
Source: androidx.customview:customview-poolingcontainer.

I searched in the SDK manager, no hope
 

Attachments

  • 2025-08-13_02-20-57.jpg
    2025-08-13_02-20-57.jpg
    102.2 KB · Views: 28
  • 2025-08-13_02-28-57.jpg
    2025-08-13_02-28-57.jpg
    174.1 KB · Views: 25

Mehrzad238

Active Member
I found the exact problem. Now I need a solution

So first of all, the problem was because I wanted to try DayNight of appcompat in manifest,but apparently, B4A or B4X does not support

B4X:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
        <item name="android:windowFullscreen">true</item>
    </style>
</resources>
)

Now I need an alternative to this method.

For more details:
I use this Sub for dark mode:

B4X:
Sub IsDarkModeEnabled As Boolean
    Dim jo As JavaObject
    jo.InitializeContext
    Dim Them As String = Setting.GetString("darktheme")
   
    If Them = "dark" Then
        Return True
    Else If Them = "light" Then
        Return False
    Else If Them = "default" Then
        Try
            Dim uiModeManager As JavaObject = jo.RunMethod("getSystemService", Array("uimode"))
            Dim nightMode As Int = uiModeManager.RunMethod("getNightMode", Null)
            Return nightMode = 2 ' MODE_NIGHT_YES
        Catch
            Log("Error checking system dark mode: " & LastException.Message)
            Return False
        End Try
    Else
        Setting.SetString("darktheme", "default")
        Return False
    End If
End Sub


which it works everywhere except on Main for some reason. That is the part I need help with.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I wanted to try DayNight of appcompat in manifest,but apparently, B4A or B4X does not support
No such thing.

Maven artifact not found: androidx.customview/customview-poolingcontainer.
This means that you aren't using the updated Android SDK.

New question = new thread.
 
Upvote 0
Top