2012-03-06 126 views
0

我開發了j2me應用程序。現在我正在將該應用程序移植到android平臺。 我已經下載了android sdk並在build.xml中配置了android.home。然後我發出ant emulator我收到以下錯誤。將j2me應用程序移植到android平臺

[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 

是否需要下載其他軟件包。或任何事情做錯了。 ?

回答

1

您必須安裝Android SDK到/ var/lib中/安卓/ Android的SDK-linux_x86/

+0

我已經安裝了Android SDK和配置了路徑進入的build.xml爲android.home – Pavunkumar 2012-03-08 12:26:38

相關問題