I'm trying to use the Scringo chat project in my own and I've encountered an error when merging the manifest files. I get this:
Description Resource Path Location Type
[/home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/ManApp/AndroidManifest.xml:45, /home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/Scringo/AndroidManifest.xml:53] Trying to merge incompatible /manifest/application/activity[@name=com.facebook.LoginActivity] element:
<activity
-- @android:name="com.facebook.LoginActivity"
-- @android:screenOrientation="portrait"
-- @android:windowSoftInputMode="adjustPan">
<activity
++ @android:configChanges="orientation|keyboardHidden|screenSize"
++ @android:name="com.facebook.LoginActivity">
++</activity>
[/home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/ManApp/AndroidManifest.xml:64, /home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/Scringo/AndroidManifest.xml:57] Trying to merge incompatible /manifest/application/meta-data[@name=com.facebook.sdk.ApplicationId] element:
<meta-data
@android:name="com.facebook.sdk.ApplicationId"
-- @android:value="@string/app_id">
<meta-data
@android:name="com.facebook.sdk.ApplicationId"
++ @android:value="@string/replace_this_facebook_app_id">
ManApp line 1 Android Manifest Merger Problem
I know I have two activites the same(the facebook one) and two metadatas the same, so my question is which one do I remove or how do I handle this?
I tried removing both from my main manifest and then from the Scringo manifest and I always get this error when trying to login using facebook:
05-16 09:14:57.902: E/AndroidRuntime(2588): FATAL EXCEPTION: main
05-16 09:14:57.902: E/AndroidRuntime(2588): Process: com.manapp, PID: 2588
05-16 09:14:57.902: E/AndroidRuntime(2588): java.lang.RuntimeException: Unable to resume activity {com.manapp/com.facebook.LoginActivity}: java.lang.IllegalArgumentException: Argument 'applicationId' cannot be null or empty
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2788)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2817)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.access$800(ActivityThread.java:135)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.os.Handler.dispatchMessage(Handler.java:102)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.os.Looper.loop(Looper.java:136)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.main(ActivityThread.java:5017)
05-16 09:14:57.902: E/AndroidRuntime(2588): at java.lang.reflect.Method.invokeNative(Native Method)
05-16 09:14:57.902: E/AndroidRuntime(2588): at java.lang.reflect.Method.invoke(Method.java:515)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
05-16 09:14:57.902: E/AndroidRuntime(2588): at dalvik.system.NativeStart.main(Native Method)
05-16 09:14:57.902: E/AndroidRuntime(2588): Caused by: java.lang.IllegalArgumentException: Argument 'applicationId' cannot be null or empty
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.internal.Validate.notNullOrEmpty(Validate.java:67)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.widget.WebDialog$BuilderBase.<init>(WebDialog.java:447)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.widget.WebDialog$Builder.<init>(WebDialog.java:559)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient$AuthDialogBuilder.<init>(AuthorizationClient.java:1015)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient$WebViewAuthHandler.tryAuthorize(AuthorizationClient.java:632)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.tryCurrentHandler(AuthorizationClient.java:268)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.tryNextHandler(AuthorizationClient.java:234)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.authorize(AuthorizationClient.java:157)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.startOrContinueAuth(AuthorizationClient.java:138)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.LoginActivity.onResume(LoginActivity.java:117)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.Activity.performResume(Activity.java:5310)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2778)
05-16 09:14:57.902: E/AndroidRuntime(2588): ... 12 more
I have an app id in the strings file of my project and one in the scringo strings project and I have changed the value to both to no use.
The only thing that always seems to work is the facebook image share I already had. Even stranger, if I go and share something and after that try to login, I don't get an error anymore, it just works fine.
Any ideas of what might be the problem and how to solve this?
I ran into the same issue today after I added the following to my project.properties file:
I was able to resolve the issues by removing the conflicting lines from the Scringo AndroidManifest.xml file. In other words, if you remove the lines:
And,
From your Scringo AndroidManifest.xml the errors should go away. Do note that I added "/" to the end (closing tags) as that is how mine is listed; perhaps you have closing tags elsewhere. Also, I did have to remove some permissions that were duplicated in my Scringo AndroidManifest.xml as well.
I found the section about setting the manifestmerger to true on this page helpful: http://www.scringo.com/docs/buzztouch/android-integration/