我该如何处理警告?
记录说
[proguard] Note: duplicate definition of library class...
...
[proguard] Note: there were 370 duplicate class definitions.
[proguard] Initializing...
[proguard] Warning: abc.cba..: can't find superclass or interface xyz.zyx....
...
[proguard] Note: the configuration refers to the unknown class 'android.app.backup.BackupAgentHelper'...
...
[proguard] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer...
...
Run Code Online (Sandbox Code Playgroud)
proguard.cfg
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep …Run Code Online (Sandbox Code Playgroud) 我正在开发一个需要多个库的Android应用程序(适用于Facebook,Google Maps v2和Quickblox等),导致方法数量溢出超过64K限制:
Unable to execute dex: method ID not in [0, 0xffff]: 65536
Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536
Run Code Online (Sandbox Code Playgroud)
由于我不能没有任何这些库,我寻找方法限制bug的解决方案.我发现了一个来自Android开发者的热门博客文章,推荐使用源代码部门.(我正在谈论的博客条目可以在这里找到:http://android-developers.blogspot.com.es/2011/07/custom-class-loading-in-dalvik.html).我一直在尝试这个解决方案但没有成功.
我现在的问题是,最大量的代码不在我的应用程序本身,但在所需的库中,所以我必须在我必须在我的应用程序中加载的不同dex文件中传播这些库.我对Ant的了解非常有限,我想知道的是我应该在build.xml文件中编写什么来使dex复制我想要的每个库:
<!-- Primary dex to include my source code and some libraries. -->
<copy todir="${out.classes.absolute.dir}.1" >
<fileset dir="${out.classes.absolute.dir}" >
...
</fileset>
</copy>
<!-- Secondary dex to include some other libraries. -->
<copy todir="${out.classes.absolute.dir}.2" >
<fileset dir="${out.classes.absolute.dir}" >
...
</fileset>
</copy>
Run Code Online (Sandbox Code Playgroud)
任何帮助都会得到真正的赞赏.在此先感谢,亲切的问候!
有没有办法为groovy的AntBuilder打开debug/verbose输出?换句话说,我希望启用更详细的输出,就像ant -verbose从命令行获得的那样.
我知道的记录任务,如所描述这里,但写入文件,我想写stdout或可能是一个记录器(如规定的一个Groovy编写Maven插件).
我有在 ant 构建脚本中创建 zip 文件的代码。
<target name="zip-dist" description="archiving artifacts">
<zip destfile="${artifacts}/${zipfile}.zip" update="false" basedir="${target.dist}" includes="*.xyz-*" />
</target>
Run Code Online (Sandbox Code Playgroud)
当使用 win zip 提取文件时right click -> Extract All...没有警告,但在提取时7-zip显示“警告:标题错误”但它成功了。
我知道这对输出没有影响,因为它只是一个警告,所以建议用户忽略它或使用win-zip方法。
但是相信我,让他们理解是不可能的,他们都一直在吃我的头。有很多用户,我一次又一次地重复同样的事情。他们仍然希望它被修复。
我可以在ant-ziptarget 中使用任何属性还是应该在 中使用任何不同的压缩技术ant build?
我已经搜索了多个在线资源,这是最后的希望!请帮忙。
我正在尝试使用AntBuilder在Groovy中压缩文件和目录。我有以下代码:
def ant = new AntBuilder()
ant.zip(basedir: "./Testing", destfile:"${file}.zip",includes:file.name)
Run Code Online (Sandbox Code Playgroud)
这将压缩文件“ blah.txt”,而不压缩文件“ New Text Document.txt”。我认为问题是空间。我尝试了以下方法:
ant.zip(basedir: "./Testing", destfile:"${file}.zip",includes:"${file.name}")
ant.zip(basedir: "./Testing", destfile:"${file}.zip",includes:"\"${file.name}\"")
Run Code Online (Sandbox Code Playgroud)
以上均未解决问题。我正在使用Ant,因为它将压缩目录,并且我在工作中无法访问org.apache.commons.io.compression。