boxme / SquareCamera

Android Camera Library For Square Photo Taking
MIT License
569 stars 189 forks source link

Manifest merger failed / ActivityNotFoundException on CameraActivity #55

Open joknu1 opened 8 years ago

joknu1 commented 8 years ago

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

opg7371 commented 8 years ago

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

bmbariah commented 7 years ago

"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

joknu1 commented 7 years ago

"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.

bmbariah commented 7 years ago

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

finalight commented 7 years ago

may I know is it resolved?

SoyArpad commented 7 years ago

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