繁体   English   中英

生成签名的APK时出现Android错误

[英]Android Error while generating signed APK

当我构建APK或生成签名的APK。 我收到以下错误。 有什么办法吗?

错误:任务':app:dexguardRelease'的执行失败。

java.io.IOException:无法读取[D:\\ Android Project \\ LOANWARE2 \\ app \\ build \\ intermediates \\ res \\ resources-release.ap _(;;;;;;! / 〜,!/ LICENSE,! /.。 /,!,!/picasa.ini,!/META-INF/NOTICE /.svn/,!/,!/ _ /,!/ LICENSE.TXT ,! / SCCS /,!/ META-INF /许可, !/NOTICE.txt, / about.html,! / thumbs.db,! / META-INF / LICENSE.txt,! / NOTICE,! / CVS / ,! / package.html,! / META-INF / NOTICE .txt ,!/ overview.html ,!org / w3c / dom / ,! org / w3c / dom / ls / ,! org / xml / sax /,!org / xmlpull / v1 /,! org / json / JSON * ,!org / apache / commons / logging / Log.class,org / apache / http / Consts.class,org / apache / http / HttpHeaders.class,org / apache / http / entity / ContentType.class,org / apache / http / util / Args.class,org / apache / http / util / Asserts.class,org / apache / http / util / CharsetUtils.class,org / apache / http / util / NetUtils.class,org / apache / http / util / TextUtils.class,!org / apache / http /,! org / apache / http / auth / ,!org / apache / http / auth / params / ,!org / apache / http / client / ,!org / apache / http / client / entity / ,!org / apache / http / client / methods / ,!org / apache / http / client / params / ,!org / apache / http / cl ient / protocol / ,! org / apache / http / client / utils / Utils.class,!org / apache / http / conn / ,! org / apache / http / conn / params / ,! org / apache / http / conn / routing / ,!org / apache / http / conn / scheme / ,!org / apache / http / conn / ssl / ,!org / apache / http / conn / util / ,!org / apache / http / cookie / , !org / apache / http / cookie / params / ,!org / apache / http / entity / ,!org / apache / http / impl /,! org / apache / http / impl / auth /,! org / apache / http / IMPL /客户/,!组织/阿帕奇/ HTTP / IMPL /康涅狄格州/,!组织/阿帕奇/ HTTP / IMPL /康涅狄格州/ tsccm /,!组织/阿帕奇/ HTTP / IMPL /饼干/,!组织/阿帕奇/ HTTP / impl / entity /,! org / apache / http / impl / io /,! org / apache / http / io / ,!org / apache / http / message / ,!org / apache / http / params / ,!org /阿帕奇/ HTTP /协议/,!组织/阿帕奇/ HTTP / UTIL /,COM / guardsquare / dexguard /运行/,!COM / guardsquare /,! / dexguard .pro,!lib / 词典 .txt,!com / saikoa / .properties,!proguard / .properties,META-INF / services /,! META-INF /,!。hg ** ,! /.hg,!。git ** ,! /.git,!。svn ** ,! /.svn,!CVS,!CVS /,! / CVS ,! / CVS /,!。cvsignore ,! /.cvsignore,!SCCS,!SCCS/,! / SCCS ,! / SCCS /,! .orig ,! 〜, .class,lib / / .so,res / raw / * 。so ,assets / .so ,! .so,.. readme 、! 。保持,! .DS_Store ,! .aidl ,! .rs ,! .rsh ,! .d ,! .java ,! .scala ,! .scc ,! .swp ,! .bak,!** thumbs.db,!** picasa.ini,!** package.html,!** overview.html ,! .AIDL ,! .RS ,! .RSH ,! .D ,! JAVA! .SCALA ,! .SCC ,! .SWP ,! .BAK,!** THUMBS.DB,!** PICASA.INI,!** PACKAGE.HTML,!** OVERVIEW.HTML)](无法处理XML文件[AndroidManifest.xml]:文件似乎位于二进制XML格式。请检查是否包含默认的DexGuard应用程序配置(2字节UTF-8序列的无效字节2)。

在您的app / build.gradle文件中尝试这个

android{
...
packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/services/javax.annotation.processing.Processor'
    }

...
}

您还可以排除错误提及的其他文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM