Javax.comm error



我正在尝试编写一个Android应用程序,我可以从COMM端口读取。我遵循这个教程:http://www.java-samples.com/showtutorial.php?tutorialid=11

所以,我改变了一点,拿出了主方法,并将其替换为一个OnCreate从Android活动,但这是我得到奇怪的错误,我不明白。有人能告诉我哪里可以找到错误吗?

下面是错误日志:

04-04 02:26:43.426: E/AndroidRuntime(1418): FATAL EXCEPTION: main
04-04 02:26:43.426: E/AndroidRuntime(1418): java.lang.NoClassDefFoundError: javax.comm.CommPortIdentifier
04-04 02:26:43.426: E/AndroidRuntime(1418):     at com.example.jovialjavauart.Reader.onCreate(Reader.java:27)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.Activity.performCreate(Activity.java:5104)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.os.Looper.loop(Looper.java:137)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at android.app.ActivityThread.main(ActivityThread.java:5039)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at java.lang.reflect.Method.invokeNative(Native Method)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at java.lang.reflect.Method.invoke(Method.java:511)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-04 02:26:43.426: E/AndroidRuntime(1418):     at dalvik.system.NativeStart.main(Native Method)

谢谢你

javax.comm不是Android包,没有移植到Dalvik字节码。你是索尔。

http://developer.android.com/reference/packages.html

相关内容

  • 没有找到相关文章

最新更新