钛需要('合金/测量')错误

时间:2014-07-08 14:11:53

标签: android titanium require measurement

我试着要求这个

var measurement = require('alloy/measurement')

并使用此代码打开窗口

$.container.setBorderRadius((OS_ANDROID ? measurement.dpToPX($.container.width) : $.container.width) / 2);

发生此错误

[DEBUG] Module: Loading module: alloy/measurement -> Resources/alloy/measurement.js
[DEBUG] AndroidRuntime: Shutting down VM
[WARN]  dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41a8bba8)
[ERROR] TiApplication: (main) [99,34734] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to resume activity {ws.xxx.zzz/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy; Titanium 3.2.2,2014/03/05 12:22,96e9a07

我的环境

  • Titanium SDK 3.2.2.GA
  • Android 4.4.4与Nexus 4
  • Titanium Client 3.2.3和Alloy 1.3.1
  • OSX 10.9.4

0 个答案:

没有答案