Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Has anyone been able to solve the Android Manifests bug?

Discussion in 'Android' started by zigglr, May 28, 2016.

  1. zigglr

    zigglr

    Joined:
    Sep 28, 2015
    Posts:
    82
    There seems to be a bug in Unity which gives an error for the Android Manifests. If you're not familiar with the error, i'll post it below. Has anyone been able to find a fix for this yet?



    CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    C:\Users\b\AppData\Local\Android\sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/b/AppData/Local/Android/sdk\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages com.unity.purchasing.amazon:android.support.v7.appcompat:android.support.v7.cardview:com.unity.purchasing:com.facebook:com.facebook.android:com.google.firebase:com.android.vending.billing:com.unity.purchasing.googleplay:com.onesignal:com.google.android.gms.ads.impl:com.google.android.gms.ads:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.tasks:android.support.v4:android.support.v4:com.unity3d.ads.android -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\AmazonAppStore\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\cardview-v7-23.2.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\common\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\facebook-android-sdk-4.11.0\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.5.0\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\firebase-common-9.0.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\GoogleAIDL\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\GooglePlay\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\onesignal-unity\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\play-services-ads-9.0.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\play-services-ads-lite-9.0.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\play-services-base-9.0.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\play-services-basement-9.0.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\play-services-tasks-9.0.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\support-v4-23.1.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\support-v4-23.2.1\res" -S "C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res"

    stderr[
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <android.support.v7.widget.ButtonBarLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/abc_alert_dialog_button_bar_material for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml:48: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <android.support.v7.widget.DialogTitle>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/abc_alert_dialog_material for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <TextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/abc_dialog_title_material for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.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>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.chatapp.depadstudio:layout/abc_screen_toolbar for configuration v21.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/abc_search_view for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/notification_template_big_media for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:60: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <ImageView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:30: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/notification_template_big_media_narrow for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:77: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:96: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:64: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/notification_template_lines for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:43: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:33: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/notification_template_media for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <Chronometer>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/notification_template_part_chronometer for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <DateTimeView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/notification_template_part_time for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/select_dialog_multichoice_material for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/select_dialog_singlechoice_material for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:2: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <RelativeLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:61: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <RelativeLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <RelativeLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:52: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:19: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <View>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:10: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/unityads_button_audio_toggle for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml:8: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/unityads_button_pause for configuration v17.
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:92: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <include>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <LinearLayout>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml: note: using v17 attributes; synthesizing resource com.chatapp.depadstudio:layout/unityads_view_video_play for configuration v17.
    AndroidManifest.xml:30: Tag <provider> attribute authorities has invalid character '$'.
    ]
    stdout[
    Configurations:
    (default)

    Files:
    drawable\unityads_background_button_pause.xml
    Src: () C:\Users\b\Desktop\test\Temp\StagingArea\android-libraries\unityads-release\res\drawab<message truncated>
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    I don't think Unity handles Android 'preview' tools very well. This issue should be fixed starting Unity 5.3.4p6, according to this bug that is listed in the release notes:
    (788040) - Android: Buildpipe - Don't make use of preview SDK tools installed.

    They should just pick the newest (non preview) version of tools that is installed,
     
  3. zigglr

    zigglr

    Joined:
    Sep 28, 2015
    Posts:
    82
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Cool glad u got it working
     
  5. Andy-Lee

    Andy-Lee

    Joined:
    Aug 16, 2014
    Posts:
    26
    So, in short, this is not really a bug. This error was caused by having 2 support-v4.jar/.aar in the same project. Remove one and the error will be fixed.

    This is a common problem when using multiple plugins, especially those which have auto-resolver (i.e. automatically add support-v4 or Google-Play-Services library to the project). This feature is convenient, but at the same time, can be a nightmare.

    Also, beware of those play-services-XXX.aar, they are incompatible with google-play-services_lib. Those .aar are part of the google-play-services_lib. So, if you are going to work if a plugin that needs the library, remember to remove those .aar and keep the library, unless you know which modules the plugin needs.
     
    ilmario likes this.
  6. sunflower-dever

    sunflower-dever

    Joined:
    Jun 5, 2016
    Posts:
    1
    yes,below the Plugins/Android,play-services-ads-8.4.0.aar,play-services-basement-8.4.0.arr and google-play-services_lib folder.
    when delete the google-play-services_lib folder,it works well!
     
  7. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    So this not Unity bug but user error then!!
     
  8. google_play_service_dev

    google_play_service_dev

    Joined:
    Oct 2, 2016
    Posts:
    16