SquareCamera icon indicating copy to clipboard operation
SquareCamera copied to clipboard

Manifest merger failed / ActivityNotFoundException on CameraActivity

Open joknu1 opened this issue 8 years ago • 6 comments

Hi,

I get

Error:Execution failed for task ':hospitalitix:processDebugManifest'. Manifest merger failed : Attribute application@theme value=(@style/AppBaseTheme) from AndroidManifest.xml:17:9-44 is also present at [com.github.boxme:squarecamera:1.1.0] AndroidManifest.xml:11:18-76 value=(@style/squarecamera__CameraFullScreenTheme). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:14:5-33:19 to override.

when trying to use your lib. If I override as suggested I get

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.assaabloyhospitality.hospitalitix/com.desmond.squarecamera.CameraActivity}; have you declared this activity in your AndroidManifest.xml?

when trying to start your activity via Intent. Not sure the problems are related though.

Is there a reason you have a theme set on application level? Since you only have one Activity, and it has a theme set, the application level theme is never used.

Br. Jonas

joknu1 avatar Sep 30 '16 09:09 joknu1

I got the same problem...please provide us a solution for it

opg7371 avatar Oct 06 '16 17:10 opg7371

"android.content.ActivityNotFoundException: Unable to find explicit activity class {com.assaabloyhospitality.hospitalitix/com.desmond.squarecamera.CameraActivity}; have you declared this activity in your AndroidManifest.xml?"

Have you tried declaring it in your manifest file? Seems pretty basic..As for the first error, you may have conflicting themes. Try updating your project to the latest build tools 25 e.t.c

bmbariah avatar Nov 21 '16 14:11 bmbariah

"Seems pretty basic.." Okay, I guess I can declare your activity in my Manifest. One could argue that you could declare your own activity in your own Manifest in your own module. Seems pretty basic.. :)

As for the theme squarecamera__CameraFullScreenTheme declared on application level, it seems pointless.

Thank you for your reply.

joknu1 avatar Nov 21 '16 15:11 joknu1

Actually I had this issue sometime back and took me a while to remember how I solved this but as the log says all you need to do is add "tools:replace="android:theme" to your MAIN PROJECT level manifest file..under application...and it's not my module :). Just removed this line in my code and got the same error. This assumes you are using the module and not the .jar

bmbariah avatar Nov 21 '16 17:11 bmbariah

may I know is it resolved?

finalight avatar Jul 31 '17 06:07 finalight

@finalight just in your AndroidManifest file add tools:replace="android:theme" in the application tag

SoyArpad avatar Sep 30 '17 06:09 SoyArpad