在Dex阶段期间构建大型Codename One应用程序时出错 [英] Error When building a large Codename One Application During the Dex Phase

查看:174
本文介绍了在Dex阶段期间构建大型Codename One应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用Google搜索一下,我了解到64K函数的硬性限制(包括所有库,最重的是谷歌播放服务),或者您可以使用多重dex机制。



如何为Codename One激活此功能?



据我所知, Codename One 使用Ant,据我所知只是为gradle工作。

仅供参考这是一种解决方法,它将谷歌播放服务分割为具有原生android的子库: HREF = http://android-developers.blogspot.com.es/2014/12/google-play-services-and-dex-method.html> http://android-developers.blogspot.com.es/ 2014/12 / google-play-services-and-dex-method.html

解决方案

类似的问题,并与Codename One的专业支持对应。 Gradle支持是他们刚刚宣布的东西,所以它没有记录在案,但应在下次更新中提供。



您需要将以下构建提示添加到您的项目中:

 android.gradle = true 
android.multidex = true

我明白,一旦3.3版本发布,gradle将成为默认版本,所以将来只需要multidex选项。


I got an error in the build server when sending an Android build during the dex phase.

Googling a bit I learned that there is a hard limit of 64K functions (including all libs, the heaviest is google play services), or you can use the multiple dex mechanism.

How do I activate this for Codename One?

I understand Codename One uses Ant and as far as I understand this only works for gradle.

FYI this is the workaround, that splits google play services into sub libraries with native android:

http://android-developers.blogspot.com.es/2014/12/google-play-services-and-dex-method.html

解决方案

I had a very similar issue and corresponded with Codename One's pro support on this. Gradle support was something they just recently announced so its not as documented but should be available in the next update.

You need to add the following build hints to your project:

android.gradle=true 
android.multidex=true

I understand that gradle will be the default build once 3.3 rolls around so in the future only the multidex option will be needed.

这篇关于在Dex阶段期间构建大型Codename One应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆