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?

B4A Version: 13.40
Parsing code. (0.22s)
Java Version: 19
Building folders structure. (0.09s)
Compiling code. (0.52s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.20s)
Linking resources Error
AndroidManifest.xml:252: error: resource style/Theme.Hidden (aka fg.SimpleNote:style/Theme.Hidden) not found.
AndroidManifest.xml:260: error: resource style/Theme.Hidden (aka fg.SimpleNote:style/Theme.Hidden) not found.
AndroidManifest.xml:268: error: resource style/Theme.PlayCore.Transparent (aka fg.SimpleNote:style/Theme.PlayCore.Transparent) not found.
error: failed processing manifest.

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:
#Region Project Attributes
#ApplicationLabel: Example
#VersionCode: 20
#VersionName: 3.26.1
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: true
'#AdditionalRes: ../resources
#MultiDex: true
#End Region

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region

#AdditionalJar: com.android.support:support-v4

'Für crashlytics
#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.firebase:firebase-crashlytics
#AdditionalJar: com.google.android.datatransport:transport-runtime
#AdditionalJar: com.google.android.datatransport:transport-backend-cct

'Nötig für die verwendung von classe "ExternalStorage"
#AdditionalJar: com.android.support:support-core-utils

1753947980131.png
 
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
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.
The correct solution is to use the recommended SDK: https://www.b4x.com/b4a.html
 
Upvote 0
Status
Not open for further replies.
Top