将j2me应用程序移植到android平台



我已经开发了j2me应用程序。现在我正在将该应用程序移植到android平台。我已经下载了android sdk,并在build.xml中配置了android.home。然后我发布了ant emulator,我得到了以下错误。

[j2mepolish] J2ME Polish 2.1.4 (2010-01-18) (GPL License)
[j2mepolish] Loading device database...
[j2mepolish] Last build was interrupted or failed, now clearing work directory...
[j2mepolish] using locale [en_IN]...
[j2mepolish] assembling resources for device [Generic/android].
[j2mepolish] preprocessing for device [Generic/android].
[j2mepolish] processing locale code... 
[j2mepolish] preparing binary libraries...
[j2mepolish] copying binary libraries to [/usr/lib/jvm/J2ME-Polish_2.1.4/CorpSMBS_2.3/build/real/Generic/android/en_IN/classes]...
[j2mepolish] Invoking precompiler [de.enough.polish.android.AndroidPreCompiler]...
[j2mepolish] java.io.IOException: Cannot run program "/var/lib/android/android-sdk-linux_x86/tools/android" (in directory "/var/lib/android/android-sdk-linux_x86/platforms/android-15/tools"): java.io.IOException: error=2, No such file or directory
[j2mepolish]    at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
[j2mepolish]    at java.lang.Runtime.exec(Runtime.java:593)
[j2mepolish]    at de.enough.polish.util.ProcessUtil.exec(ProcessUtil.java:162)
[j2mepolish]    at de.enough.polish.util.ProcessUtil.exec(ProcessUtil.java:109)
[j2mepolish]    at de.enough.polish.android.precompiler.ActivityPreCompiler.preCompile(ActivityPreCompiler.java:93)
[j2mepolish]    at de.enough.polish.android.AndroidPreCompiler.preCompile(AndroidPreCompiler.java:59)
[j2mepolish]    at de.enough.polish.precompile.PreCompiler.execute(PreCompiler.java:99)
[j2mepolish]    at de.enough.polish.ExtensionManager.executeExtensions(ExtensionManager.java:527)
[j2mepolish]    at de.enough.polish.ExtensionManager.preCompile(ExtensionManager.java:512)
[j2mepolish]    at de.enough.polish.ant.PolishTask.precompile(PolishTask.java:2539)
[j2mepolish]    at de.enough.polish.ant.PolishTask.compile(PolishTask.java:2291)
[j2mepolish]    at de.enough.polish.ant.PolishTask.execute(PolishTask.java:613)
[j2mepolish]    at de.enough.polish.ant.PolishTask.execute(PolishTask.java:441)
[j2mepolish]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[j2mepolish]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[j2mepolish]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[j2mepolish]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[j2mepolish]    at java.lang.reflect.Method.invoke(Method.java:597)
[j2mepolish]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[j2mepolish]    at org.apache.tools.ant.Task.perform(Task.java:348)
[j2mepolish]    at org.apache.tools.ant.Target.execute(Target.java:357)
[j2mepolish]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
[j2mepolish]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[j2mepolish]    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[j2mepolish]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[j2mepolish]    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[j2mepolish]    at org.apache.tools.ant.Main.runBuild(Main.java:698)
[j2mepolish]    at org.apache.tools.ant.Main.startAnt(Main.java:199)
[j2mepolish]    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[j2mepolish]    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[j2mepolish] Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
[j2mepolish]    at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
[j2mepolish]    at java.lang.ProcessImpl.start(ProcessImpl.java:65)
[j2mepolish]    at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
[j2mepolish]    ... 29 more
BUILD FAILED
/usr/lib/jvm/J2ME-Polish_2.1.4/CorpSMBS_2.3/build.xml:92: Unable to create activity / project: java.io.IOException: Cannot run program "/var/lib/android/android-sdk-linux_x86/tools/android" (in directory "/var/lib/android/android-sdk-linux_x86/platforms/android-15/tools"): java.io.IOException: error=2, No such file or directory
Total time: 16 seconds

我是否需要下载任何其他软件包。或者有什么事情做错了?

您必须将android SDK安装到/var/lib/android/android-SDK-linux_x86/

相关内容

  • 没有找到相关文章

最新更新