我正在使用Titanium SDK,需要实现滑块样式菜单。
为此,我发现NappDrawer是一个有用的小部件,它可以在iOS设备和模拟器上成功运行。但是,当我尝试在Android设备上构建相同的软件包时,它会向我显示错误和'Unfortunately stopped'
警报消息。
我已将代码放在Google Drive上。 我也注册了同样的问题here。
我遇到的错误是:
[INFO] : Installing apk: /Users/paresh.thakor/Documents/Titanium Studio Workspace/TestingPull/build/android/bin/TestingPull.apk
[INFO] : Installing app on device: Hudl HT7S3
[INFO] : App successfully installed
[INFO] : Starting app: com.investis.pullref/.TestingpullActivity
[INFO] : Application pid: 21167
[INFO] : Project built successfully in 38s 54ms
-- Start application log -----------------------------------------------------
[INFO] : TiApplication: (main) [0,0] checkpoint, app created.
[INFO] : TiApplication: (main) [49,49] Titanium 3.2.3 (2014/04/22 10:17 b958a70)
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 3.101MB for 432012-byte allocation
[INFO] : TiApplication: (main) [291,340] Titanium Javascript runtime: v8
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
[WARN] : V8Object: Runtime disposed, cannot set property 'userAgent'
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 4.909MB for 1536016-byte allocation
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.investis.pullref.TestingpullActivity@41bbfcb8
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x418f5930)
[ERROR] : TiApplication: (main) [143,143] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.investis.pullref/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null; Titanium 3.2.3,2014/04/22 10:17,b958a70
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.investis.pullref/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
[ERROR] : TiApplication: at android.app.ActivityThread.access$600(ActivityThread.java:141)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5041)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[ERROR] : TiApplication: Caused by: java.lang.NumberFormatException: Unable to convert null
[ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:407)
[ERROR] : TiApplication: at dk.napp.drawer.Drawer.processProperties(Drawer.java:343)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185)
[ERROR] : TiApplication: at dk.napp.drawer.DrawerProxy.windowCreated(DrawerProxy.java:145)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:452)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:528)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5104)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
[ERROR] : TiApplication: ... 11 more
[INFO] : Process: Sending signal. PID: 21167 SIG: 9
答案 0 :(得分:0)
问题得到解决。问题是我在Android上使用ANIMATION_FADE,这只是iOS版本。所以动画的变化解决了我的问题。