Android Question theme.hidden not found after updating to B4A 13.4

Status
Not open for further replies.

marcick

Well-Known Member
Licensed User
Longtime User
I followed the instruction and updated to 13.4 but I have now this compile error:
I deleted also the object folder before compile.

B4X:
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.02s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.08s)
Linking resources    Error
AndroidManifest.xml:240: error: resource style/Theme.Hidden (aka it.cc.app:style/Theme.Hidden) not found.
AndroidManifest.xml:248: error: resource style/Theme.Hidden (aka it.cc.app:style/Theme.Hidden) not found.
AndroidManifest.xml:256: error: resource style/Theme.PlayCore.Transparent (aka it.cc.app:style/Theme.PlayCore.Transparent) not found.
error: failed processing manifest.

Searching inside all project files, the only point where exists the key "Theme.Hidden" is in AndroidManifest.xml
I attach here the file
 

Attachments

  • AndroidManifest.xml
    14.9 KB · Views: 47

Filippo

Expert
Licensed User
Longtime User
Hi,

I have the same problem with an app, and even though I implemented Erel's tips, I couldn't solve the problem.
There's still an error somewhere, but where?


Manifest:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
'SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:largeHeap, "true")
'End of default text.

'Einstellung für Adaptive-icon
SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@mipmap/background"/>
    <foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)

'Nötig damit die App nur auf Android-Geräte installiert werden kann.
AddApplicationText(
<property android:name="REQUIRE_SECURE_ENV" android:value="1" />
)

AddPermission(android.permission.USE_FINGERPRINT)
'AddPermission(android.permission.RECORD_AUDIO)

AddManifestText(<!--suppress AndroidElementNotAllowed -->
<queries>
    <intent>
        <action android:name="android.speech.RecognitionService" />
    </intent>
</queries>
)

'Attribute für SearchView-Classe
SetActivityAttribute(Main, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(mNewNotiz, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(mPasswd, android:windowSoftInputMode, adjustResize|stateHidden)

'Anpassungen für SDK-35 (Android 15)
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, colors.xml,
<resources>
   <color name="actionbar">#FF1A73E8</color>
   <color name="statusbar">#FF1A73E8</color>
   <color name="textColorPrimary">#FF000000</color>
   <color name="navigationBar">#FF1A73E8</color>
   <color name="colorPrimary">#FF000000</color>
   <color name="colorAccent">#FF1A73E8</color>   
</resources>
)
CreateResource(values, theme.xml,
<resources>
    <style name="LightTheme" parent="@android:style/Theme.Material.Light">
        <item name="android:colorPrimary">@color/actionbar</item>
        <item name="android:colorPrimaryDark">@color/statusbar</item>
        <item name="android:textColorPrimary">@color/textColorPrimary</item>
        <item name="android:navigationBarColor">@color/navigationBar</item>
        <item name="android:colorAccent">@color/colorAccent</item>
       <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
    </style>
</resources>
)

'************ Firebase Ads ************
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
AddReplacement($ADMOB_APP_ID$, ca-app-pub-xxxxxxxxxxxxxxxx~xxxxxxxxxxxxxxx)
'************ Firebase Ads (end) ************

'************ Google Play Services Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
'************ Google Play Services Base (end) ************

'************ Firebase Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'************ Firebase Base (end) ************

'************ Firebase Auth ************
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
'************ Firebase Auth (end) ************

'GooglePlayBilling - In App Purchases
CreateResourceFromFile(Macro, GooglePlayBilling.GooglePlayBilling)
'End of GooglePlayBilling

CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)

'Crashlytics components
CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)
'End of Crashlytics components

'Nötig damit die Website vom History angezeigt werden kann.
CreateResourceFromFile(Macro, Core.NetworkClearText)

Main:

 
Upvote 0

ddk1

Member
Licensed User
Longtime User
Don't know its related but my compile gets error "res\values-v20\theme.xml:6: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.".
And I solved this by remming manifest line 'CreateResourceFromFile(Macro, Themes.LightTheme)' which I see you have.
I haven't figured out since this, how to apply light vs dark theme.
I have discovered since, by moving the theme.xml text into my manifest, it is just that new EdgeToEdgeEnforcement line that it didn't like.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The correct solution is to use the recommended SDK: https://www.b4x.com/b4a.html
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…