在Android项目使用Scala-library.jar抛出错误:库不能dexed [英] Using scala-library.jar in an Android project throws error: Library cannot be dexed

查看:100
本文介绍了在Android项目使用Scala-library.jar抛出错误:库不能dexed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的Andr​​oid项目设置使用:

I have a very simple Android project set up that uses:


  • 几个自定义斯卡拉JAR文件所要为我的应用程序执行某些功能

  • 斯卡拉-library.jar版本2.9.1最终让斯卡拉罐子可以运行

然而,每当我试图启动应用程序,我得到的错误说,斯卡拉库不能Dexed,因为它太大了。

However, whenever I try to launch the app, I get errors saying that the scala-library cannot be Dexed because it is too large.

谷歌搜索显示,这是一个问题,但我不能确定如何解决它。有人说ProGuard的答案,但我不知道该怎么做。

Googling shows that this is a problem, but I am unsure how to fix it. Some say Proguard is the answer, but I don't know how to do that.

我目前不使用Ant任何构建管理,只是Eclipse工具。

I don't currently use Ant for any build management, just Eclipse tools.

任何帮助或建议吗?

推荐答案

您应该使用德兴标准库的ProGuard之前。

You should use ProGuard prior to dexing the standard library.

有一个SBT插件可在这里斯卡拉的Andr​​oid项目: https://github.com/jberkel / Android的插件/

There is an sbt plugin for Scala Android projects available here: https://github.com/jberkel/android-plugin/

入门指南非常详细: https://github.com/ jberkel / Android的插件/维基/工具入门

这个插件会自动使用ProGuard的。

This plugin automatically uses ProGuard.

如果你想自己手动搭配使用ProGuard,请上网:的http:// proguard.sourceforge.net/index.html#manual/usage.html

If you want to use ProGuard manually yourself, check out: http://proguard.sourceforge.net/index.html#manual/usage.html

这篇关于在Android项目使用Scala-library.jar抛出错误:库不能dexed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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