Unity 安卓打包中遇见的那些坑

提前准备:

  • 以下遇见的坑是我在往项目里集成国内外知名互联网公司的SDK中遇见的,不管怎样总算是从坑里爬出来了,之所以把错误代码全部贴出来,是希望大家“活学活用”,也希望大家给出建议,毕竟自己也是在熟悉这一块!
  • 关于“.aapt.exe”的那点事,详情请参考:Android AAPT详解,我就不再这里赘述了。
  • 关于“-auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I”
    引用某网友中,表示“在Android外挂项目里的res文件夹里有的地方的xml设置文件里的设置内容找不到”

参考文档:
记录Android-Studio遇到的各种坑

错误一:CommandInvokationFailure: Failed to re-package resources.

声明: 用Unity5.5.1f1建立的工程,FacebookUnitySDK的版本是7.10.1
简介:按照Facebook开发文档提示完成配置,打包以后,报出如下错误:

CommandInvokationFailure: Failed to re-package resources.
D:\SoftDown\Work\adt-bundle-windows-x86_64\sdk\build-tools\23.0.1\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I D:/SoftDown/Work/adt-bundle-windows-x86_64/sdk\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages com.facebook:com.facebook.android -S "F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res" -S "F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.10.1\res"

stderr[
F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\values\values.xml:131: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.NoActionBar'.

F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\values\values.xml:136: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Dialog'.

]
stdout[
Configurations:
 (default)

Files:
  AndroidManifest.xml
    Src: () AndroidManifest.xml

Resource Dirs:
Including resources from package: D:\SoftDown\Work\adt-bundle-windows-x86_64\sdk\platforms\android-25\android.jar
applyFileOverlay for drawable
trying overlaySet Key=com_facebook_auth_dialog_background.xml
trying overlaySet Key=com_facebook_auth_dialog_cancel_background.xml
trying overlaySet Key=com_facebook_auth_dialog_header_background.xml
trying overlaySet Key=com_facebook_button_background.xml
trying overlaySet Key=com_facebook_button_icon.xml
trying overlaySet Key=com_facebook_button_icon_blue.png
trying overlaySet Key=com_facebook_button_icon_white.png
trying overlaySet Key=com_facebook_button_like_background.xml
trying overlaySet Key=com_facebook_button_like_icon_selected.png
trying overlaySet Key=com_facebook_button_login_background.xml
trying overlaySet Key=com_facebook_button_login_logo.xml
trying overlaySet Key=com_facebook_button_login_silver_background.xml
trying overlaySet Key=com_facebook_button_send_background.xml
trying overlaySet Key=com_facebook_button_send_icon_blue.png
trying overlaySet Key=com_facebook_button_send_icon_white.png
trying overlaySet Key=com_facebook_close.png
trying overlaySet Key=com_facebook_favicon_blue.xml
trying overlaySet Key=com_facebook_profile_picture_blank_portrait.png
trying overlaySet Key=com_facebook_profile_picture_blank_square.png
trying overlaySet Key=com_facebook_send_button_icon.xml
trying overlaySet Key=com_facebook_tooltip_black_background.9.png
trying overlaySet Key=com_facebook_tooltip_black_bottomnub.png
trying overlaySet Key=com_facebook_tooltip_black_topnub.png
trying overlaySet Key=com_facebook_tooltip_black_xout.png
trying overlaySet Key=com_facebook_tooltip_blue_background.9.png
trying overlaySet Key=com_facebook_tooltip_blue_bottomnub.png
trying overlaySet Key=com_facebook_tooltip_blue_topnub.png
trying overlaySet Key=com_facebook_tooltip_blue_xout.png
trying overlaySet Key=messenger_bubble_large_blue.png
trying overlaySet Key=messenger_bubble_large_white.png
trying overlaySet Key=messenger_bubble_small_blue.png
trying overlaySet Key=messenger_bubble_small_white.png
trying overlaySet Key=messenger_button_blue_bg_round.xml
trying overlaySet Key=messenger_button_blue_bg_selector.xml
trying overlaySet Key=messenger_button_send_round_shadow.png
trying overlaySet Key=messenger_button_white_bg_round.xml
trying overlaySet Key=messenger_button_white_bg_selector.xml
trying overlaySet Key=app_banner.png
trying overlaySet Key=app_icon.png
applyFileOverlay for layout
trying overlaySet Key=com_facebook_activity_layout.xml
trying overlaySet Key=com_facebook_device_auth_dialog_fragment.xml
trying overlaySet Key=com_facebook_login_fragment.xml
trying overlaySet Key=com_facebook_smart_device_dialog_fragment.xml
trying overlaySet Key=com_facebook_tooltip_bubble.xml
trying overlaySet Key=messenger_button_send_blue_large.xml
trying overlaySet Key=messenger_button_send_blue_round.xml
trying overlaySet Key=messenger_button_send_blue_small.xml
trying overlaySet Key=messenger_button_send_white_large.xml
trying overlaySet Key=messenger_button_send_white_round.xml
trying overlaySet Key=messenger_button_send_white_small.xml
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
trying overlaySet Key=com_facebook_button_text_color.xml
trying overlaySet Key=com_facebook_send_button_text_color.xml
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res\drawable-xhdpi\app_banner.png
Processing image: res\drawable-mdpi\app_icon.png
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_blue.png
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_blue.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_blue.png: 34% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_blue.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_blue.png: 27% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_blue.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_blue.png: 25% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_blue.png: 17% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_white.png: 161% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_white.png: 158% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_white.png: 162% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_like_icon_selected.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_white.png: 158% size of source)
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_like_icon_selected.png: 156% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_like_icon_selected.png
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_like_icon_selected.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_like_icon_selected.png: 147% size of source)
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_like_icon_selected.png: Processin140% size ofg imag e:s ource)
F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_like_icon_selected.png
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png: 61% size of source)
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_like_icon_selected.png: 137% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png: 65% size of source)
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png: 89% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\reProcessings\drawa imable-ge: mdFp:\Myi-v4\Gictohub\m_faceboUniok_bty\uTtton_send_icon_white.png
estBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png: 75% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png: 137% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png: 128% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_close.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png: 109% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_close.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_close.png: 123% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_close.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_close.png: 135% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_portrait.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_close.png: 108% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_square.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_portrait.png: 109% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_tooltip_black_background.9.png
    (processed image res\drawable-mdpi\app_icon.png: 94% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_tooltip_black_background.9.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_square.png: 109% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_tooltip_black_background.9.png
    (processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_tooltip_black_bottomnub.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_tooltip_black_bottomnub.png: 167% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_tooltip_black_bottomnub.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_tooltip_black_bottomnub.png: 177% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_tooltip_black_bottomnub.png
    (processed image F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_tooltip_black_bottomnub.png: 172% size of source)
Processing image: F:\MyGithub\Unity\TestBuildFBUnitySDKPackage\Temp\StagingArea\a

解决办法:有点坑爹,试了网上N种方法都不行,最后用Unity5.6.3f1建立工程就好了,猜测应该是版本问题比较低,有些资源没有读取到。如果那个朋友知道原因,请不吝赐教,虚心接受!!!

错误二:

CommandInvokationFailure: Failed to re-package resources.
D:\SoftDown\Work\adt-bundle-windows-x86_64\sdk\build-tools\23.0.1\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I 
"D:/SoftDown/Work/adt-bundle-windows-x86_64/sdk\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages 
android.support.graphics.drawable.animated:android.support.v7.appcompat:android.support.v7.cardview:android.support.customtabs:com.facebook:com.facebook.android:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4:android.support.graphics.drawable:com.pi.usb.resources -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\animated-vector-drawable-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\cardview-v7-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\customtabs-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.10.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-compat-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-core-ui-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-core-utils-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-fragment-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-media-compat-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-v4-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\support-vector-drawable-25.3.1\res" -S "D:\proje-1\Client\Temp\StagingArea\android-libraries\unity-android-resources\res"

stderr[
D:\proje-1\Client\Temp\StagingArea\android-libraries\unity-android-resources\res\drawable\umeng_socialize_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
D:\proje-1\Client\Temp\StagingArea\android-libraries\unity-android-resources\res\drawable\umeng_socialize_refersh.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
D:\proje-1\Client\Temp\StagingArea\android-libraries\unity-android-resources\res\drawable\umeng_socialize_title_back_bt_normal.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_action_mode_close_item_material.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_action_mode_close_item_material for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_alert_dialog_button_bar_material for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_alert_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_alert_dialog_title_material for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_dialog_title_material for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_popup_menu_header_item_layout.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_popup_menu_header_item_layout for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_popup_menu_item_layout.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_popup_menu_item_layout for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_screen_toolbar.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:touchscreenBlocksFocus from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.pi.usb:layout/abc_screen_toolbar for configuration v21.
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_search_view for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\abc_select_dialog_material.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/abc_select_dialog_material for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_device_auth_dialog_fragment.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/com_facebook_device_auth_dialog_fragment for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:94: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:94: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:83: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:83: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\layout\com_facebook_smart_device_dialog_fragment.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/com_facebook_smart_device_dialog_fragment for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\notification_action.xml:17: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\notification_action.xml:32: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\notification_action.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/notification_action for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\notification_action_tombstone.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\notification_action_tombstone.xml:37: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout\notification_action_tombstone.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/notification_action_tombstone for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/notification_template_big_media for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\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 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_custom.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/notification_template_big_media_custom for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml:60: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml:30: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.pi.usb:layout/notification_template_big_media_narrow for configuration v17.
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow_custom.xml:107: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from 
D:\proje-1\Client\Temp\StagingArea\android-libraries\appcompat-v7-25.3.1\res\layout-v11\notification_template_big_media_narrow_custom.xml:93: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf

解决办法:这一次自己做的比较简单粗暴,根据stderr中的信息,有的是warning,有的是note,试了后多种办法,自己就选择了将提示为note的的文件给干掉了,因为我们无法修改Temp的文件,所以只能选择干掉原文件!但是,我这样做是有依据的,因为无法找到提示的错误,我怀疑是新导入的SDK与之前实现类似功能的libraries中的库冲突,经试验可行,自己都觉得很狗屎......

错误三:

打包进行的阶段-Build DEX

Unity 安卓打包中遇见的那些坑_第1张图片
出错给的提示

开发之路从来走的都不容易,已经在最后的一个阶段了,但是也碰见最难的问题了,面对强敌也要敢于亮剑,所以错误提示如下:

CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_111\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/SoftDown/Work/adt-bundle-windows-x86_64/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\UnityInstall\Unity5.6.3f1\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.SimpleLog$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.WeakHashtable$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$6) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$4) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.nio.SelectChannelConnector$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.security.SslSocketConnector$SslConnection$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.security.SecurityHandler$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.security.HashUserRealm$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.security.SecurityHandler$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.security.HashUserRealm$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.deployer.ContextDeployer$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.HttpFields$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.servlet.HashSessionManager$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.servlet.HashSessionManager$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.HttpFields$4) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.Request$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.HttpFields$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.HttpConnection$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.HttpFields$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.HttpFields$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.jetty.AbstractBuffers$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.mortbay.resource.JarResource$1) that doesn't come with an
associated EnclosingMethod attribute. This 

吐槽一下,之所以说是目前我遇见的UnityAndroid打包遇见的最难解的Bug,原因的stderr中给的提示,其他的提示,该删则删,该简则简,但是这种的真的不好找.......

错误分析:表示从Android工程复制过来的libs文件夹里的东西和Unity的有冲突,通常是含有和Unity的classes.jar相同内容的jar文件。--Unity如何挂接Android程序

解决办法:

  • 检查 Assets\Plugins\Android 下是否有文件重复。
  • 删除 classes.jar文件 assets和libs 都检查下,因为这文件u3d本身就自带了,和SDK交互需要拷贝到eclipse里,复制回U3D又重复了。
  • 删除 android-support-v*** 打头的文件 如android-support-v7-appcompat.jar
  • AndroidManifest.xml 配置问题,需要进一步排查。

你可能感兴趣的:(Unity 安卓打包中遇见的那些坑)