用户在使用在线打包功能打包时可能遇到打包失败的问题,本文主要描述集中常见的问题用户可以对照排除打包常见的错误。
Android云端打包
错误原因:图片格式不对,应用图标和启动图片都要求png格式,其它格式(如jpg)会报错。
解决方法:请检查应用的图标是否有格式问题,严格按照指定的尺寸使用png格式提交打包。
图标文件和启动图片都需要png格式的图片,用户可以根据HBuilder提示添加指定尺寸的图片或者通过修改manifest文件修改图片的因引用,具体修改方式可参考
  
务必注意不能把jpg等文件改名为png来使用。
打包后如果图标不变化,可能是因为缓存,重启下手机试试。  
错误原因:应用名称中包含特殊字符如“@”等
解决方法:修改应用名称,去掉特殊字符
  
错误原因:打包后APP空白
解决方法:(1)请检查应用的appid是否被修改,
注意此appid并非是包名,如果修改了,可以新建一个app项目复制其appid即可
(2)由于特殊字符导致解析失败
检查文件夹是否有特殊字符ios云端打包
用户在选择“appstore专用”选项打非越狱包时可能遇到如下问题。
1. 配置的profile(.mobileprovision)文件不正确
错误日志
Error reading S/MIME message   
64601:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:/SourceCache/OpenSSL098/OpenSSL098-52.30.1/src/crypto/asn1/asn1_lib.c:153:   
BuildConfigure Failed 31013 mobileprovision 不合法
解决方法:
请参考http://ask.dcloud.net.cn/article/152教程生成正确的profile(.mobileprovision)文件
2. 配置的证书(.p12)文件无效或者输入的证书密码错误
/usr/bin/security delete-certificate -c ""   
Unable to delete certificate matching ""   
BuildConfigure Failed 31011 无法获取p12证书的Team标识
解决方法:
这是因为p12文件中没有包含有效的证书内容,可以双击导入到系统证书库中,如果能正确导入则说明证书有效,Window系统会提示“指定的文件为空”。

用户打包是需要保证红框内的证书和绿框内密码相匹配,否则打包会失败  
请参考http://ask.dcloud.net.cn/article/152教程导出正确的私钥(.p12)文件
3. 配置的APPID(bundle identifier)与profile(.mobileprovision)文件中包含的不一致
BuildConfigure Failed 31015 编译错误   
xcode build 开始  
----------------------------------------------------------------------  
Check dependencies   
Code Sign error: Provisioning profile does not match bundle identifier: The provisioning profile specified in your build settings (“TTTTTT”) has an AppID of “yy.yyy.YYYYYY” which does not match your bundle identifier “xx.xxx.XXXXXX”.   
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'   
** BUILD FAILED **  
The following build commands failed:   
Check dependencies   
(1 failure)
解决方法:
修改打包应用的APPID和profile文件一致即可

用户要保证提交的profile文件指定的appid和红框内的appid保持一致否则打包会失败  
其中xx.xxx.XXXXXX为打包时配置的,而yy.yyy.YYYYYY为profile(.mobileprovision)文件中包含的。
4. 配置的证书(.p12)与profile(.mobileprovision)文件不区配
BuildConfigure Failed 31015 编译错误   
xcode build 开始  
----------------------------------------------------------------------  
Check dependencies   
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“TTTTTT”) were found.   
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.4'   
** BUILD FAILED **   
The following build commands failed:   
Check dependencies   
(1 failure)  
以及:  
/usr/bin/codesign --force --sign 128F9389E0B05671B3334551D3E46A04FDD716B2 --resource-rules=安装包制作目录build/Release-iphoneos/DCloud_Pandora.app/ResourceRules.plist --entitlements 安装包制作目录build/Pandora.build/Release-iphoneos/Pandora.build/DCloud_Pandora.app.xcent 安装包制作目录build/Release-iphoneos/DCloud_Pandora.app  
Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!  
128F9389E0B05671B3334551D3E46A04FDD716B2: no identity found  
Command /usr/bin/codesign failed with exit code 1  
解决方法:
请参考http://ask.dcloud.net.cn/article/152教程导出正确的私钥(.p12)文件  
5. 提示doesn't support the Push Notifications capability错误
BuildConfigure Failed 31015 编译错误  
xcode build 开始  
// ...  
=== BUILD TARGET Pandora OF PROJECT Pandora WITH THE DEFAULT CONFIGURATION (Release) ===  
Check dependencies  
Provisioning profile "XXXXXXXX" doesn't support the Push Notifications capability.  
Provisioning profile "XXXXXXXX" doesn't include the aps-environment entitlement.  
Code signing is required for product type 'Application' in SDK 'iOS 10.0'  
** BUILD FAILED **  
The following build commands failed:  
    Check dependencies  
(1 failure)  
解决方法:
请参考http://ask.dcloud.net.cn/article/1088  
如用户遇到打包问题按照以上方法无法排除请联系管理员
            
            
            