我按照说明为Android构建Scala应用程序:
scala-to-android
基本上,我安装了Scala并将ant build.properties更改为指向Scala并将build.xml更改为包含build-scala.xml.
ant scala-compile
是成功的,但是,
ant debug
Scala的编译:
-shrink-if-test:
[echo] Checking if Scala libraries are installed on emulator or device...
[adb] bootclasspath=/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
-shrink-config:
[taskdef] Could not load deFinitions from resource scala/tools/ant/task.properties. It Could not be found.
BUILD Failed
/home/salil/Programs/android-projects/FirstScala/build-scala.xml:82: Problem: Failed to create task or type invoked
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
我是ant,Android和Scala的初学者.任何帮助,将不胜感激.非常感谢提前!
解决方法:
我在Scala上遇到了与android dev相同的问题.实际上,构建脚本会查找名为task.properties的文件,该文件位于scala / tools / ant / task.properties中.这包装在jar ant-invoked.jar中.我希望你能从该网站下载android-sdk项目zip存档.只需将android-sdk根目录下的“configs”文件夹复制到项目根文件夹中即可.
这是在scala-build.xml中搜索文件的
<!-- Project settings -->
property name="configs.dir" value="${basedir}/configs" />
<property name="ant-invoked.jar" value="${configs.dir}/ant/ant-invoked.jar" />
和目标shrink-config
<target name="-shrink-config"
description="Generate ProGuard configuration file">
<taskdef resource="scala/tools/ant/task.properties"
classpath="${ant-invoked.jar}" />
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。