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

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Reaaly sorry but I don't understand the question and not able to give an answer.
I have no idea and I never worked with this theme. Maybe looking the manifest you can guess?
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
No. In the manifest editor it is not present this theme. It appears in AndroidManifest after compile.
This is my manifest:

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="false"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)

'End of default text.

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
CreateResourceFromFile(Macro, Core.NetworkClearText)
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)

AddPermission(android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)

' AddPermission(android.permission.READ_PHONE_STATE) non più usato
RemovePermission(com.google.android.gms.permission.AD_ID)

AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />)
   
AddApplicationText(
<uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />
<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="....."/>
)

AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <external-files-path name="name" path="shared" />
)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Sorry, i can´t further help here.
Do not know where it comes from.

As far as i know B4A does not add anything to the manifest which is not based on the manifest-Editor-entries.
Based on the showed manifesteditor-content the manifest should not include anything related to Theme.PlayCore or Theme.Hidden.

I can´t further help here, sorry.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you. I tryed also to delete AndroidManifest.xml and recompile but same result.
Looking inside AndroidManifest seems it is something related to PlayServices ....

Edit: looks like it comes from here: CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
commenting the line the error disappear (but I use Firebase ..)

Edit2:
About a year ago, I added FirebaseAuth to the manifest while trying to solve a crash that was occurring on a Huawei device.
At the time, I found a suggestion on the forum indicating that this might help avoid the following error:

B4X:
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process
it.aa.app. Make sure to call FirebaseApp.initializeApp(Context) first.

I don’t fully remember the exact context, but it was likely an attempt to ensure FirebaseApp got initialized properly.
 
Last edited:
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you. I did now a fresh reinstall of

Android SDK + Required Resources​

in a new folder and configured path to Android36.jar.
But the error is the same ....

1.png
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
I'm sorry, I didn't understand the question. No, this is what's in that path (also tried with 7-Zip).

1.png
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
It looks like this resource isn't referenced.

What happens if you add:
B4X:
#AdditionalJar: androidx.credentials:credentials-play-services-auth

It disappear the error about theme.hidden but still present the other:

B4X:
B4A Version: 13.40
Parsing code.    (0.58s)
    Java Version: 19
Building folders structure.    (1.92s)
Running custom action.    (1.86s)
Compiling code.    (1.33s)
Compiling layouts code.    (0.08s)
Organizing libraries.    (2.86s)
    (AndroidX SDK)
Compiling resources    (4.05s)
Linking resources    Error
AndroidManifest.xml:256: error: resource style/Theme.PlayCore.Transparent (aka it.elettronicablancato.bmap4e:style/Theme.PlayCore.Transparent) not found.
error: failed processing manifest.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
This way everything works even without declaring the AdditionalJar. After compilation, I found some extracted entries in the folders you mentioned (values.xml and values-v21.xml). The only thing left is the warning that the FirebaseAuth library is not used, but I can't remove it, otherwise the error comes back. So I'll leave it like this with the warning?. I just want to point out that in previous versions of B4A, everything had been working for years without that library, which is why I only noticed the issue after updating to version 13.4.
 
Upvote 0
Status
Not open for further replies.
Top