Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

CommandInvokationFailure: Failed to re-package resources - Facebook Analytics issue

Discussion in 'Editor & General Support' started by TalhaDX, May 26, 2018.

  1. TalhaDX

    TalhaDX

    Joined:
    Feb 2, 2013
    Posts:
    94
    First i was facing Gradle problem. I updated and installed Android SDK tools 27.0.1 and Android SDK tools 27.0.3 and updated Build System to internal from Gradle in Build settings.

    I have only added Facebook Analytics in the project.

    On Import this error appears:

    ArgumentNullException: Argument cannot be null.
    Parameter name: path
    System.IO.Directory.CreateDirectory (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:75)
    GooglePlayServices.PlayServicesResolver.ResolveUnsafe (System.Action`1 resolutionComplete, Boolean forceResolution)
    GooglePlayServices.PlayServicesResolver+<Resolve>c__AnonStorey11.<>m__19 ()
    GooglePlayServices.PlayServicesResolver.ExecuteNextResolveJob ()
    GooglePlayServices.PlayServicesResolver.Resolve (System.Action resolutionComplete, Boolean forceResolution, System.Action`1 resolutionCompleteWithResult)
    GooglePlayServices.PlayServicesResolver.AutoResolve ()
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:197)



    On Building the project:

    CommandInvokationFailure: Failed to re-package resources.
    C:\Program Files (x86)\Android\android-sdk\build-tools\28.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/Program Files (x86)/Android/android-sdk\platforms\android-26\android.jar" -F bin/resources.ap_ --extra-packages android.support.graphics.drawable.animated:android.support.v7.appcompat:android.support.v7.cardview:android.support.customtabs:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4:android.support.graphics.drawable:com.facebook.android:com.facebook.applinks:com.facebook.common:com.facebook.core:com.facebook.login:com.facebook.messenger:com.facebook.places:com.facebook.share -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.animated-vector-drawable-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.cardview-v7-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.customtabs-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-compat-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-core-ui-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-core-utils-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-fragment-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-media-compat-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-v4-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.support-vector-drawable-25.3.1\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.12.0\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-login\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-messenger\res" -S "F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-share\res"

    stderr[
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_action_mode_close_item_material.xml:17: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <ImageView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_action_mode_close_item_material.xml:17: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <ImageView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_action_mode_close_item_material.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_action_mode_close_item_material for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_alert_dialog_button_bar_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:scrollIndicators from <ScrollView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_alert_dialog_button_bar_material.xml:26: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <android.support.v7.widget.ButtonBarLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_alert_dialog_button_bar_material for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_alert_dialog_title_material.xml:45: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <android.support.v7.widget.DialogTitle>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_alert_dialog_title_material.xml:36: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <ImageView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_alert_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_alert_dialog_title_material for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_dialog_title_material.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_dialog_title_material for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_popup_menu_header_item_layout.xml:24: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_popup_menu_header_item_layout.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_popup_menu_header_item_layout for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_popup_menu_item_layout.xml:59: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <ImageView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_popup_menu_item_layout.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_popup_menu_item_layout for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_screen_toolbar.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:touchscreenBlocksFocus from <android.support.v7.widget.ActionBarContainer>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.tta.polytesting:layout/abc_screen_toolbar for configuration v21.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_search_view for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_select_dialog_material.xml:23: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <view>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\abc_select_dialog_material.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/abc_select_dialog_material for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_device_auth_dialog_fragment.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/com_facebook_device_auth_dialog_fragment for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_smart_device_dialog_fragment.xml:94: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_smart_device_dialog_fragment.xml:94: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_smart_device_dialog_fragment.xml:83: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_smart_device_dialog_fragment.xml:83: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_smart_device_dialog_fragment.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <android.support.v7.widget.AppCompatImageView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\facebook-common\res\layout\com_facebook_smart_device_dialog_fragment.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/com_facebook_smart_device_dialog_fragment for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\notification_action.xml:17: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\notification_action.xml:32: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\notification_action.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/notification_action for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\notification_action_tombstone.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\notification_action_tombstone.xml:37: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout\notification_action_tombstone.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/notification_action_tombstone for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <include>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.tta.polytesting:layout/notification_template_big_media for configuration v17.
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:89: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <LinearLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:56: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <FrameLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:45: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <FrameLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:45: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <FrameLayout>
    F:\code\Unity3D\Projects\mars1982ltd\Poly\poly\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:27: note: removin<message truncated>



    Also:


    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    If any of you guys have faced this problem. Help out
     
    Last edited: May 28, 2018
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    The message is truncated (as you can see from the end of the log). Please add the proper error message you're getting so we can assist.
     
  3. TalhaDX

    TalhaDX

    Joined:
    Feb 2, 2013
    Posts:
    94
    I can only see error upto this in Unity. It says truncated in the Editor.

    Additionally, here is my SDK Manager Status: http://prntscr.com/jngku2
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    The message in the console window is cut. you can see the full log file (see this link to find where it's stored)
     
  5. TalhaDX

    TalhaDX

    Joined:
    Feb 2, 2013
    Posts:
    94
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    you are probably missing some libraries that are required by the Facebook SDK (AppCompat)
     
  7. TalhaDX

    TalhaDX

    Joined:
    Feb 2, 2013
    Posts:
    94
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    It is not related to your SDK manager. you need to have some libraries in your project. usually they are resolved automatically. for some reason you don't have them. not sure why.