Android:如何在 Eclipse 中使用 DX 选项?

发布于 2024-10-01 02:20:10 字数 430 浏览 0 评论 0原文

我只是想我可以使用 jython 来开发 Android 应用程序。
但这并不比我想象的容易。
我创建了 android 示例项目并将 jython.jar 添加到项目中。
不久之后我遇到了“转换为 Dalvik 格式失败”错误消息。
所以我用谷歌搜索了几乎所有关于该消息的页面。
但是我找不到正确的答案。
最接近的答案是在 dx 选项中使用“--no-locals”。
我在命令控制台中完成了它,看起来效果很好。我想...

我的问题是...
我想在 Eclipse 中使用 dx 选项(“--no-locals”)。
因为eclipse会自动将apk文件复制到模拟器中并运行。
无论如何要在 Eclipse 中设置 dx.bat 选项(“--no-locals”)吗?
有没有人成功使用jython for android?

I simply thought I could use jython for developing Android App.
But it was not easier than I thought.
I created android sample project and added jython.jar into the project.
After soon I encountered with "Conversion to Dalvik format failed" error msg.
So I googled almost every pages about that msg.
However I could not find a proper answer.
Closest answer was using "--no-locals" in dx option.
I did it in command console and it seemed to work well. I guess...

My question is...
I want to use the dx option("--no-locals") with eclipse.
Because eclipse automatically copys apk file to the emulator and runs it.
Is it anyway to set dx.bat option ("--no-locals") in eclipse?
Is there anyone who succeed in use of jython for android?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云胡 2024-10-08 02:20:10

现在我具体不了解 jython.jar,但并没有考虑到甚至可以将每个 externaljar 文件添加到 Android 项目中。很可能您的 jar 依赖于 Android SDK 中未包含的包(因为 Android 不是 Java 的精确克隆,只是提到这一点),如果是这样,则不可能包含它。

尝试仔细查看错误堆栈跟踪,并查找任何表明缺少某些依赖项的内容。如果您的罐子属于这种情况,这可能会为您提供线索。

Now I don't know about jython.jar specifically, but it is not given that it is even possible to add every externaljar file to an Android project. It might very well be that your jar is depending on packages that are not included in the Android SDK (because Android isn't an exact clone of Java, just to have mentioned that), and if so it won't be possible to include it.

Try looking very closely on the error stack trace and look for anything indicating there are some missing dependencies. This might give you a clue if this is the case for your jar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文