Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Don't specify an Android app theme as that upsets the manifest merger #206

Closed
koush opened this issue Aug 6, 2019 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request fixed

Comments

@koush
Copy link

koush commented Aug 6, 2019

Description

	Attribute application@theme value=(@style/ScryptedTheme) from AndroidManifest.xml:37:9-45
	is also present at [com.arthenica:mobile-ffmpeg-https:4.2.LTS] AndroidManifest.xml:17:9-40 value=(@style/AppTheme).
	Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:31:5-95:19 to override.

Expected behavior
The library works out of the box.

Current behavior
The above build error.

Environment

  • Platform: Android
  • Architecture: All
  • Version 4.2 and 4.2.2
  • Android Studio version (if applicable) 3.4.2

Fix:

Just remove this line:
https://github.com/tanersener/mobile-ffmpeg/blob/master/android/app/src/main/AndroidManifest.xml#L6

Ideally the FFmpeg Library manifest should be empty.

@koush
Copy link
Author

koush commented Aug 6, 2019

Obviously, the suggested workaround (tools:replace="android:theme") is available, but should not be necessary.

@tanersener tanersener self-assigned this Aug 6, 2019
@tanersener tanersener added the enhancement New feature or request label Aug 6, 2019
@tanersener tanersener added this to To do in Next Main Release via automation Aug 6, 2019
@tanersener
Copy link
Owner

Fixed in the development branch, will be included in the next main release.

@vlad-roid
Copy link

vlad-roid commented Aug 20, 2019

Thanks, this huge piece of **** cost me several hours. I didn't actually encounter the build error described here. Instead, I was using the new MaterialComponents theme under a custom theme, which happened to be also named AppTheme. When it has the same name, Android may randomly switch to use the AppTheme defined by the FFmpeg library, which results in
java.lang.IllegalArgumentException: This component requires that you specify a valid TextAppearance attribute. Update your app theme to inherit from Theme.MaterialComponents (or a descendant).
Temporary solution: Rename your custom app theme until this change is live. Then the build error described above appears, which you can fix using the suggested tools:replace="android:theme".

@tanersener
Copy link
Owner

@vlad-roid Thanks for the detailed explanation.

@tanersener tanersener moved this from To do to Done in Next Main Release Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request fixed
Projects
No open projects
Development

No branches or pull requests

3 participants