Unity 之 安卓打包中遇见的那些坑 (转)

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

转自 养渔人 :https://www.jianshu.com/p/b1c8b6ec8352

提前准备:

以下遇见的坑是我在往项目里集成国内外知名互联网公司的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

解决办法:这一次自己做的比较简单粗暴,根据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 ) t h a t d o e s n ′ t c o m e w i t h a n a s s o c i a t e d E n c l o s i n g M e t h o d a t t r i b u t e . T h i s c l a s s w a s p r o b a b l y p r o d u c e d b y a c o m p i l e r t h a t d i d n o t t a r g e t t h e m o d e r n . c l a s s f i l e f o r m a t . T h e r e c o m m e n d e d s o l u t i o n i s t o r e c o m p i l e t h e c l a s s f r o m s o u r c e , u s i n g a n u p − t o − d a t e c o m p i l e r a n d w i t h o u t s p e c i f y i n g a n y " − t a r g e t " t y p e o p t i o n s . T h e c o n s e q u e n c e o f i g n o r i n g t h i s w a r n i n g i s t h a t r e f l e c t i v e o p e r a t i o n s o n t h i s c l a s s w i l l i n c o r r e c t l y i n d i c a t e t h a t i t i s ∗ n o t ∗ a n i n n e r c l a s s . w a r n i n g : I g n o r i n g I n n e r C l a s s e s a t t r i b u t e f o r a n a n o n y m o u s i n n e r c l a s s ( o r g . m o r t b a y . j e t t y . s e c u r i t y . S s l S o c k e t C o n n e c t o r 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 1)thatdoesntcomewithanassociatedEnclosingMethodattribute.Thisclasswasprobablyproducedbyacompilerthatdidnottargetthemodern.classfileformat.Therecommendedsolutionistorecompiletheclassfromsource,usinganuptodatecompilerandwithoutspecifyingany"target"typeoptions.Theconsequenceofignoringthiswarningisthatreflectiveoperationsonthisclasswillincorrectlyindicatethatitisnotaninnerclass.warning:IgnoringInnerClassesattributeforananonymousinnerclass(org.mortbay.jetty.security.SslSocketConnectorSslConnection$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 配置问题,需要进一步排查。


转自 养渔人 :https://www.jianshu.com/p/b1c8b6ec8352

你可能感兴趣的:(ジ﹋★☆『,己,卟,話,』)