- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试启动并运行 J2ME Polish 示例项目,但很困难。
我正在使用带有 J2ME Polish 插件的 Netbeans 8.0.2。
当我尝试创建 J2ME Polish 项目 ( File
> New Project
> Java ME
> J2ME Polish Project
) 时,New Project
向导工作正常,直到我到达最后一步,此时单击 Finish
按钮不会执行任何操作。然后我必须关闭向导并手动打开项目(似乎已创建 - 尽管可能不完全?)。
接下来,我将 enough-j2mepolish-client.jar
重新定位到项目的根目录后,通过引用 Output
来修复资源投诉。
然后我尝试清理并构建项目,但我在 build.xml
窗口中收到此错误:
ant -f M:\\Netbeans\\J2ME-Polish-Project rebuild
clean:
Deleting directory M:\Netbeans\J2ME-Polish-Project\build
pre-init:
pre-load-properties:
exists.config.active:
exists.netbeans.user:
exists.user.properties.file:
load-properties:
exists.platform.active:
exists.platform.configuration:
exists.platform.profile:
basic-init:
cldc-pre-init:
cldc-init:
cdc-init:
semc-pre-init:
semc-init:
savaje-pre-init:
savaje-init:
sjmc-pre-init:
sjmc-init:
ojec-pre-init:
ojec-init:
cdc-hi-pre-init:
cdc-hi-init:
nokiaS80-pre-init:
nokiaS80-init:
post-init:
init:
j2mepolish-init:
j2mepolish:
J2ME Polish 2.4 (2013-08-27) (GPL License)
Loading device database...
Processing [7] devices...
building application for [Generic/jtwi] (1/7):
using locale [de_DE]...
java.lang.IllegalArgumentException: The property [dir.dist] is not defined in input [${dir.dist}]
at de.enough.polish.Environment.getProperty(Environment.java:537)
at de.enough.polish.Environment.writeProperties(Environment.java:452)
at de.enough.polish.ant.build.BuildSetting.getDestDir(BuildSetting.java:621)
at de.enough.polish.ant.PolishTask.initialize(PolishTask.java:1613)
at de.enough.polish.ant.PolishTask.execute(PolishTask.java:600)
at de.enough.polish.ant.PolishTask.execute(PolishTask.java:436)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
M:\Netbeans\J2ME-Polish-Project\build.xml:82: Unable to execute J2ME Polish task:
java.lang.IllegalArgumentException: The property [dir.dist] is not defined in input [${dir.dist}]
at de.enough.polish.Environment.getProperty(Environment.java:537)
at de.enough.polish.Environment.writeProperties(Environment.java:452)
at de.enough.polish.ant.build.BuildSetting.getDestDir(BuildSetting.java:621)
at de.enough.polish.ant.PolishTask.initialize(PolishTask.java:1613)
at de.enough.polish.ant.PolishTask.execute(PolishTask.java:600)
at de.enough.polish.ant.PolishTask.execute(PolishTask.java:436)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 1 second)
除了 J2ME Polish 之外,我对 Ant 也是全新的,所以也许这可能是一个简单的问题来解决(尽管我在 1 小时后还没有成功......)。
为了完整起见,这是我的 <property name="dir.dist" value="dist" />
文件:
<!-- When you are using NetBeans 5, just rename this file -->
<!-- to build.xml. You can then use the normal menu items -->
<!-- run, debug, build and so forth from within NetBeans. -->
<!-- This file controls the build process. -->
<!-- The most important target is the "j2mepolish", -->
<!-- which controls for what devices the application should -->
<!-- be created and so on. -->
<!-- -->
<!-- Call the "emulator" target to skip the obfuscation -->
<!-- and to build the example for only one handsets. -->
<!-- The default target builds and obfuscates the example. -->
<!-- -->
<!-- The full documentation can be found at -->
<!-- http://www.j2mepolish.org -->
<!-- -->
<!-- Have fun! -->
<project
name="J2ME-Polish-Project"
default="j2mepolish">
<!-- extend the default NetBeans build script: -->
<import file="nbproject/build-impl.xml"/>
<!-- The polish.home property needs to point to the directory -->
<!-- containing the J2ME Polish installation. -->
<property name="polish.home" location="P:\Program Files\J2ME-Polish" />
<!-- import global properties -->
<property file="${polish.home}/global.properties" />
<!-- Definition of the J2ME Polish task: -->
<taskdef name="j2mepolish"
classname="de.enough.polish.ant.PolishTask"
classpath="${polish.home}/lib/enough-j2mepolish-build.jar"
/>
<!-- build targets, each target can be called via "ant [name]",
e.g. "ant clean", "ant test j2mepolish" or just "ant" for calling the default-target -->
<target name="setdeploy"
description="Call this target first to set the OTA download-URL, e.g. ant setdeploy j2mepolish"
>
<property name="deploy-url" value="http://www.company.com/download/" />
</target>
<target name="enableDebug"
description="Call this target first to skip the obfuscation step, call the emulator and start the debugger, e.g. ant enableDebug j2mepolish"
>
<property name="debug" value="true" />
</target>
<target name="test"
description="Call this target first to skip the obfuscation step and call the emulator, e.g. ant test j2mepolish"
>
<property name="test" value="true" />
<property name="dir.work" value="build/test" />
</target>
<target name="j2mepolish-init"
depends="init"
>
<property name="test" value="false" />
<property name="dir.work" value="build/real" />
<property name="deploy-url" value="" />
</target>
<!-- In this target the J2ME Polish task is used. -->
<!-- It has 3 sections: -->
<!-- 1. The info-section defines some general information -->
<!-- 2. The deviceRequirements-section chooses the devices -->
<!-- for which the application is optimized. -->
<!-- 3. The build-section controls the actual build -->
<!-- process. -->
<target name="j2mepolish"
depends="j2mepolish-init"
description="This is the controller for the J2ME build process."
>
<j2mepolish>
<!-- general settings, these settings basically form the JAD-attributes. -->
<!-- Have a look at the <jad>-section for setting specialised attributes.
You can also define localized attributes in the resources/messages.txt files -->
<info
name="J2ME Polish"
version="1.3.4"
description="A simple project that uses localization."
vendorName="Enough Software"
infoUrl="http://www.j2mepolish.org"
icon="dot.png"
jarName="${polish.vendor}-${polish.name}-${polish.locale}-menu.jar"
jarUrl="${deploy-url}${polish.jarName}"
copyright="Copyright 2005 - 2011 Enough Software. All rights reserved."
deleteConfirm="Do you really want to kill me?"
/>
<!-- selection of supported devices -->
<deviceRequirements if="config.active:defined and (test or enableCompilerMode)" >
<requirement name="Identifier" value="${config.active}" />
</deviceRequirements>
<deviceRequirements if="device:defined and (test or enableCompilerMode)" unless="config.active:defined">
<requirement name="Identifier" value="${device}" />
</deviceRequirements>
<deviceRequirements unless="test or enableCompilerMode">
<requirement name="Identifier" value="${devices}" />
</deviceRequirements>
<!-- build settings -->
<!--
-->
<build
usePolishGui="true"
workDir="${dir.work}"
destDir="${dir.dist}"
compilerMode="${enableCompilerMode}"
compilerDestDir="build/classes"
compilerModePreverify="true"
>
<!-- midlets definition, NetBeans defines all MIDlets in the Ant property manifest.midlets: -->
<midlets definition="${manifest.midlets}" if="manifest.midlets:defined" />
<midlets unless="manifest.midlets:defined">
<midlet class="de.enough.polish.example.MenuMidlet" name="Example" />
</midlets>
<!-- project-wide variables - used for preprocessing. -->
<!-- You can set localized variables in the resources/messages.txt files as well. -->
<variables includeAntProperties="true" >
<!-- use the advanced menubar mode that offers near-native command handling and positioning, on BB and Android use native commands: -->
<variable
name="polish.FullScreen"
value="menu"
unless="polish.blackberry || polish.android"
/>
<variable name="polish.MenuBar.useExtendedMenuBar" value="true" />
<!-- example variables:
In your Java-code you can use the following snipet to use this variable:
//#= private static final String UPDATE_URL = "${ update-url }";
You can change the title of the sample application with the "title"-var.
-->
<variable name="update-url" value="http://www.enough.de/update" />
<variable name="title" value="J2ME Polish" />
</variables>
<!-- Here you can set the dir attribute to "resources2" for an alternative design. -->
<resources
dir="resources/base"
defaultexcludes="yes"
excludes="readme.txt"
>
<root dir="resources/customizations/${customization}" if="${customization}.enabled" />
<!-- add the localization element for created localized
versions of your application: -->
<localization locales="de_DE, en_US" unless="test" />
<localization locales="en_US" if="test" />
</resources>
<!-- obfuscator settings: do not obfuscate when the test-property is true -->
<obfuscator name="ProGuard" unless="test or polish.blackberry" >
<!--
You can set additional parameters here, e.g.:
<parameter name="optimize" value="false" />
-->
</obfuscator>
<!-- debug settings: only include debug setting when the test-property is true -->
<debug if="test or log" verbose="true" level="error">
<filter pattern="de.enough.polish.example.*" level="debug" />
<filter pattern="de.enough.polish.ui.*" level="warn" />
<!-- activate display handler to see log entries in real time:
<handler name="display" />
-->
</debug>
<!-- user defined JAD attributes can also be used: -->
<jad>
<attribute name="Nokia-MIDlet-Category" value="Game" if="polish.group.Series40" />
</jad>
<!--
This is an example for signing MIDlets with J2ME Polish.
You can set the password on the commandline by calling "ant -Dpassword=secret",
or by setting the Ant property above.
Signing is done only for MIDP/2.0 devices.
-->
<!--
<sign
key="SignMIDlet"
keystore="midlets.ks"
password="${password}"
unless="test"
/>
-->
</build>
<!-- execution of emulator(s) -->
<emulator
wait="true"
trace="class"
securityDomain="trusted"
enableProfiler="true"
enableMemoryMonitor="true"
enableNetworkMonitor="true"
if="test and not debug"
>
<!--
<parameter name="-Xjam" value="transient=http://localhost:8080/${polish.jadName}" />
-->
</emulator>
<emulator
wait="true"
trace="class"
securityDomain="trusted"
enableProfiler="false"
enableMemoryMonitor="false"
enableNetworkMonitor="false"
if="debug"
>
<!-- Attach the emulator to the NetBeans debugger: -->
<debugger name="antcall" target="connect-debugger" port="6001" />
</emulator>
</j2mepolish>
</target>
<target
name="emulator"
depends="test,j2mepolish"
description="invokes the emulator"
>
</target>
<target name="clean"
description="allows a clean build. You should call [ant clean] whenever you made changes to devices.xml, vendors.xml or groups.xml">
<delete dir="build" />
<delete dir="dist" includes="**/*" />
</target>
<target
name="cleanbuild"
description="allows a clean build. You should call [ant cleanbuild] whenever you made changes to devices.xml, vendors.xml or groups.xml"
depends="clean, j2mepolish"
/>
<target name="debug" description="debugs the project" depends="enableDebug, test, j2mepolish" />
<target name="deploy"
description="Deploys the applications. Currently empty."
depends="j2mepolish"
/>
<target name="enableBarbie">
<property name="customization" value="Barbie" />
<property name="Barbie.enabled" value="true" />
</target>
<target name="barbie"
description="customizes this project with the settings found in resources/customizations/Barbie"
depends="enableBarbie, j2mepolish"
/>
<target name="enableFrogger">
<property name="customization" value="Frogger" />
<property name="Frogger.enabled" value="true" />
</target>
<target name="frogger"
description="customizes this project with the settings found in resources/customizations/Barbie"
depends="enableFrogger, j2mepolish"
/>
<target name="enableAnimations">
<property name="customization" value="Animations" />
<property name="Animations.enabled" value="true" />
<property name="polish.MenuBar.useExtendedMenubar" value="true" />
</target>
<target name="animations"
description="customizes this project with the settings found in resources/customizations/Animations"
depends="enableAnimations, j2mepolish"
/>
<target
name="build-all"
description="Builds your application in all customizations."
>
<subant target="j2mepolish" buildpath="." genericantfile="build.xml" inheritall="false" ></subant>
<subant target="frogger" buildpath="." genericantfile="build.xml" inheritall="false" ></subant>
<subant target="barbie" buildpath="." genericantfile="build.xml" inheritall="false" ></subant>
<subant target="animations" buildpath="." genericantfile="build.xml" inheritall="false" ></subant>
</target>
<!-- NetBeans specific build targets: -->
<target name="run"
depends="test, j2mepolish"
>
</target>
<target name="rebuild"
depends="clean, j2mepolish"
>
</target>
<target name="rebuild-all"
depends="clean, j2mepolish"
>
</target>
<target name="jar"
depends="j2mepolish"
>
</target>
<target name="jar-all"
depends="j2mepolish"
>
</target>
<target name="clean-all"
depends="clean"
>
</target>
<target name="deploy-all"
depends="deploy"
>
</target>
<target name="enable-compiler-mode">
<property name="enableCompilerMode" value="true" />
</target>
<target name="compile-single"
depends="enable-compiler-mode, j2mepolish"
>
</target>
<target name="connect-debugger">
<property name="jpda.port" value="${polish.debug.port}" />
<antcall target="nbdebug"/>
</target>
</project>
非常感谢任何帮助。
更新:(2015 年 2 月 17 日)我已经添加了 <property name="dir.work" value="build/real" />
(就在现有 ojit_code 行之后),但现在在尝试清理/构建项目时收到此错误:
ant -f M:\\Netbeans\\J2ME-Polish-Project rebuild
clean:
Deleting directory M:\Netbeans\J2ME-Polish-Project\build
pre-init:
pre-load-properties:
exists.config.active:
exists.netbeans.user:
exists.user.properties.file:
load-properties:
exists.platform.active:
exists.platform.configuration:
exists.platform.profile:
basic-init:
cldc-pre-init:
cldc-init:
cdc-init:
semc-pre-init:
semc-init:
savaje-pre-init:
savaje-init:
sjmc-pre-init:
sjmc-init:
ojec-pre-init:
ojec-init:
cdc-hi-pre-init:
cdc-hi-init:
nokiaS80-pre-init:
nokiaS80-init:
post-init:
init:
j2mepolish-init:
j2mepolish:
J2ME Polish 2.4 (2013-08-27) (GPL License)
Loading device database...
Processing [7] devices...
building application for [Generic/jtwi] (1/7):
using locale [de_DE]...
M:\Netbeans\J2ME-Polish-Project\build.xml:83: build.xml line 0: found no operator before symbol [.enabled] in term [${customization}.enabled] (both symbol and term might be simplified).
BUILD FAILED (total time: 1 second)
最佳答案
我从未深入了解这个特定的错误消息,但我最终设法启动并运行了另一个 J2ME Polish 演示项目 - 从那时起我可以根据我的要求调整该项目。
基本上,我对 Netbeans 8.0 没有什么兴趣,所以我使用了 Netbeans 7.2.1。对我有用的演示项目(您在 J2ME Polish New Project 向导的最后一步中选择的)是 datefield 项目。
我还发现选择特定设备来编译项目非常重要 - 我刚刚选择了 Generic/midp2
设备(位于向导)并确保在构建项目时将其选择为当前配置。
我预计还会有许多其他的变体也能起作用,但经过一番折腾后,这个组合最终对我有用 - 所以希望这对其他人来说是一个很好的起点。
关于java - J2ME Polish - 无法执行 J2ME Polish 任务 : java. lang.IllegalArgumentException : The property [dir. dist] 未在输入 [${dir.dist}] 中定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28548425/
这个问题在这里已经有了答案: What's the difference between html[lang="en"] and html:lang(en) in CSS? (4 个答案) 关闭 6
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 9 年前。 Improve t
来自 ./configure --help: --with-zlib=DIR Include ZLIB support (requires zlib >= 1.0.9) --with-zlib-
我正在尝试检查我的 pod 规范并收到以下错误。 [!]“Classes”存储库中的“Classes”Pod 遇到意外版本目录“ios”。 我的源文件夹设置如下: 类 - iOS - 操作系统 Pod
在 Python 中有一个名为 dir 的内置函数。这用于获取对象所有属性的列表。 我了解它的作用,但我对为什么将其称为 dir 感到困惑。这个名称与从对象中获取属性有什么关系? 最佳答案 IIRC
我正在使用以下方法遍历文件夹: Dim file As Variant file = Dir(myFolder) While (file <> "" ) mySub file '
在 Python 的交互式 shell 中,执行 dir() 会打印一个名称列表。但是在脚本中 dir() 不直接提供任何输出,我必须使用 print(dir())。 不仅仅是dir(),其他内置函数
我明白它的作用,并且一直在使用它。但有趣的是,我还没有找到说明“DIR”的实际含义 的文档。 “目录”似乎不对。 这不是“console.log() 和 console.dir() 之间有什么区别?”
我正在尝试使用字符向量在我的工作目录中创建一系列目录。没有递归,只是迭代。没有什么花哨。例如,我可以很容易地做到这一点: lapply(state.name, dir.create) 它在我的工作目录
dir(x) 和 dir(x.__class__) 有什么区别?后者返回不同的属性列表,但与前者重叠。 例如,SQLAlchemy 的 sqlalchemy.create_engine() 函数创建一
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 6 年前。 Improve t
我正在尝试使用 Dir[] 和/或使用 Dir.foreach 对目录进行 glob: files = Dir["#{options[:dir]}/**/*"].reject { |file| Fil
Git 存储库中.gitignore 文件中的/dir 和/dir/ 有区别吗? 以下有何不同? /dir /dir/ /dir/* 最佳答案 是的,这些规则是不同的。 /dir 将匹配文件、目录、链
我正在尝试编译Bootstrap 5.3以及定制的sass文件。。这就是我的东西。奇怪的是,最后一节生成了下面的css。我预计会看到下面的css。它在开头添加了[dir]。为什么要添加[dir]?我怎
我正在尝试编译Bootstrap 5.3以及定制的sass文件。。这就是我的东西。奇怪的是,最后一节生成了下面的css。我预计会看到下面的css。它在开头添加了[dir]。为什么要添加[dir]?我怎
我正在尝试编译Bootstrap 5.3以及定制的sass文件。。这就是我的东西。奇怪的是,最后一节生成了下面的css。我预计会看到下面的css。它在开头添加了[dir]。为什么要添加[dir]?我怎
你可以找到各种文档来指定 XML 文档内容的语言,使用 xml:lang,如下所示: ... HTML 和 XHTML 具有 dir 属性,可让您指定文本在默认情况下应被视为从左到右,还是默认从右到左
当我 echo 时,输出似乎相同编辑它。 我还测试了其他命令,例如 open ,但两者的结果是一样的。 最佳答案 在传统 sh -style 模式匹配,*匹配文件名中的零个或多个字符,因此 * 之间没
我想在不同时间将一个目录复制到另一个目录中。每次,我都希望新名称比以前高一个数字/我希望能够获取该数字并将其存储到变量中。 所以如果我有一个: mymaindir /home/user/dirs/ST
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我是一名优秀的程序员,十分优秀!