Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite Themes.xml of Android 12 During platform adding #257

Open
RethySen995 opened this issue Nov 15, 2022 · 4 comments · May be fixed by #259
Open

Overwrite Themes.xml of Android 12 During platform adding #257

RethySen995 opened this issue Nov 15, 2022 · 4 comments · May be fixed by #259

Comments

@RethySen995
Copy link

Android it's required with themes.xml as below:

<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen.IconBackground"> @color/cdv_splashscreen_background @drawable/ic_cdv_splashscreen 200 @style/Theme.AppCompat.NoActionBar </style> but during platform adding it's over write: <style name="MyTheme" parent="android:Theme.Holo.Light"> </style>

Cordova-android it's throws the errors
Cannot read properties of null (reading 'find')
TypeError: Cannot read properties of null (reading 'find')
node_modules\cordova-android\lib\prepare.js:387:49
at Array.forEach ().

so, How can we fix it? i hope you share it. thank you

@geraldapeoples
Copy link

geraldapeoples commented Jan 12, 2023

The issue is the plugin.xml line -

<resource-file src="src/android/Library/res/values/themes.xml" target="res/values/themes.xml"/>

This replaces the themes.xml with the plugin one, if the plugin is removed then the themes.xml file is removed ...

If you change this to -

<!-- <resource-file src="src/android/Library/res/values/themes.xml" target="res/values/themes.xml"/> -->
<config-file target="res/values/themes.xml" parent="/resources">
    <style name="MyTheme" parent="android:Theme.Holo.Light">
    </style>
</config-file>

then the style is merged into the themes.xml

geraldapeoples added a commit to geraldapeoples/ImagePicker that referenced this issue Jan 13, 2023
@ArosPrince
Copy link

The issue is the config.xml line -

Don't you mean plugin.xml ?

@geraldapeoples
Copy link

Yes you are absolutely right, the plugin.xml ... thank you for pointing that out.

@clarklight
Copy link

clarklight commented Mar 15, 2023

I removed that line but it doesn't open the gallery and is giving an error
Error: Unable to find explicit activity class {com.app.app_dev/com.synconset.MultiImageChooserActivity}; have you declared this activity in your AndroidManifest.xml?

Then the gallery doesn't open...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants