为什么 Necessitas 不支持在我的 Android 版 qt 应用程序中显示汉字?
Necessitas 是 Android 操作系统上 Qt 端口以及用户友好的 Qt Creator 与 Android 集成的代号。现在,使用 Necessitas (QT for Android),我可以运行 &在 Android 设备上调试我的 Qt 应用程序。 但是当我想在 QLabel 上 setText("中文") 时,我得到了这些日志。
为什么 Necessitas 不支持在我的 Android 版 qt 应用程序中显示汉字?或者说,我少了哪些步骤?
Starting remote process ...
I/Qt JAVA ( 469): surfaceChanged: 480,762
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8
D/dalvikvm( 469): No JNI_OnLoad found in /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8, skipping init
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8
D/dalvikvm( 469): No JNI_OnLoad found in /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8, skipping init
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-8.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-8.so 0x44ede7e8
I/Qt ( 469): qt start
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.industrius.example.Yiyaaixuexi/lib/libYiyaaixuexi.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.industrius.example.Yiyaaixuexi/lib/libYiyaaixuexi.so 0x44ede7e8
I/Qt ( 469): qt start
W/ApplicationContext( 469): Unable to create files directory
D/AndroidRuntime( 469): Shutting down VM
W/dalvikvm( 469): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime( 469): FATAL EXCEPTION: main
E/AndroidRuntime( 469): java.lang.NullPointerException
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity.startApplication(QtActivity.java:126)
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity.access$000(QtActivity.java:62)
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity$1$1.run(QtActivity.java:149)
E/AndroidRuntime( 469): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 469): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 469): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 469): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 469): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 469): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 469): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 469): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 469): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 469): Sending signal. PID: 469 SIG: 9
Necessitas is the codename for the port of Qt on the Android Operating System and of the user-friendly Qt Creator Integration with Android. Now , using Necessitas (QT for Android),I can run & debug my Qt Applications on Android Devices.
But I got these log when I want to setText("中文") on QLabel.
Why can Necessitas not support to display Chinese characters in my qt application for android ? Or, what steps do I have less ?
Starting remote process ...
I/Qt JAVA ( 469): surfaceChanged: 480,762
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8
D/dalvikvm( 469): No JNI_OnLoad found in /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8, skipping init
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8
D/dalvikvm( 469): No JNI_OnLoad found in /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8, skipping init
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-8.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-8.so 0x44ede7e8
I/Qt ( 469): qt start
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.industrius.example.Yiyaaixuexi/lib/libYiyaaixuexi.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.industrius.example.Yiyaaixuexi/lib/libYiyaaixuexi.so 0x44ede7e8
I/Qt ( 469): qt start
W/ApplicationContext( 469): Unable to create files directory
D/AndroidRuntime( 469): Shutting down VM
W/dalvikvm( 469): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime( 469): FATAL EXCEPTION: main
E/AndroidRuntime( 469): java.lang.NullPointerException
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity.startApplication(QtActivity.java:126)
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity.access$000(QtActivity.java:62)
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity$1$1.run(QtActivity.java:149)
E/AndroidRuntime( 469): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 469): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 469): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 469): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 469): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 469): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 469): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 469): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 469): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 469): Sending signal. PID: 469 SIG: 9
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题是否含糊、含糊、不完整、过于宽泛或修辞?现在我确信它根本不支持。
Is this question ambiguous, vague, incomplete, overly broad, or rhetorical ? Now I'm sure that it doesn't support at all.