Titanium windows 支持日志记录、布局和选择器

Titanium windows support for logging, layout and pickers

我一直在尝试将有关钛的项目添加到 windows phone。遗憾的是,对于我遇到的几个问题,文档并没有特别有用。请注意,我已经尝试通过大量谷歌搜索对新项目进行全新安装,但仍然没有任何运气。哦,我只使用 CLI,因为我在使用 GUI 时遇到了更严重的问题

我认为第一个最烦人的事情是日志记录模块在应用程序加载后就中断了,所以我无法记录任何东西,不知道这是怎么回事。

其次是排版问题。我认识到 windows phone 具有不同的元素并且样式也不同,但是文本字段上有巨大的边距我无法摆脱。

第三,我尝试添加一个选择器,但是,一旦打开就无法设置背景,也无法调整主题(默认为深色),而且 setSelectedRow 选项不起作用.

可能还有更多,但这些是我花最多时间的问题。

我认为我的构建日志可能会说明问题所在,有很多警告和错误:

C:\Users\username\work\cpi-app>appc ti build -p windows -T wp-emulator -C 8-1-1
Appcelerator Command-Line Interface, version 5.4.0
Copyright (c) 2014-2016, Appcelerator, Inc.  All Rights Reserved.

8/17/2016, 7:06:50 PM

Operating System
  Name                        = Microsoft Windows 10 Pro
  Version                     = 10.0.14393
  Architecture                = 64bit
  # CPUs                      = 2
  Memory                      = 3178790912

Node.js
  Node.js Version             = 4.4.7
  npm Version                 = 2.15.8

Titanium CLI
  CLI Version                 = 5.0.9

Titanium SDK
  SDK Version                 = 5.4.0.GA
  SDK Path                    = C:\ProgramData\Titanium\mobilesdk\win32.4.0.GA
  Target Platform             = windows

Command
  C:\Program Files\nodejs\node.exe C:\Users\username\.appcelerator\install.4.0\package\node_modules\titanium\lib\titanium.js build -p windows -T wp-emulator -C 8-1-1 --config-file C:\Users\username\AppData\Local\Temp\build-1471417604044.json --log-level info --no-banner --project-dir C:\Users\username\work\cpi-app

[INFO]  Building for Windows Phone emulator: 8-1-1
[INFO]  Deploy type: development
[INFO]  Debugging disabled
[INFO]  Profiler disabled
[INFO]  Launching emulator: 8-1-1
[INFO]  Missing 7 app icons, generating missing icons
[INFO]    Square24x24Logo.png - Used for badge - size: 24x24
[INFO]    Square44x44Logo.png - Used for logo - size: 44x44
[INFO]    Square71x71Logo.png - Used for logo - size: 71x71
[INFO]    Square150x150Logo.png - Used for logo - size: 150x150
[INFO]    Logo.png - Used for logo - size: 150x150
[INFO]    StoreLogo.png - Used for logo - size: 50x50
[INFO]    SmallLogo.png - Used for logo - size: 30x30
[INFO]  Processing JavaScript files
[INFO]  Generating i18n files
[INFO]  Generating Native Type Wrappers
[INFO]  Setting up native modules for CMakeLists.txt...
[INFO]  Writing appxmanifest C:\Users\username\.titanium\vsbuild\cpi-app\Package.store.appxmanifest.in
[INFO]  Writing appxmanifest C:\Users\username\.titanium\vsbuild\cpi-app\Package.phone.appxmanifest.in
[INFO]  Writing appxmanifest C:\Users\username\.titanium\vsbuild\cpi-app\Package.win10.appxmanifest.in
[INFO]  Writing CMakeLists.txt: C:\Users\username\.titanium\vsbuild\cpi-app\CMakeLists.txt
[INFO]  CmakeLists.txt contents unchanged, retaining existing file.
[INFO]  Running cmake at C:\ProgramData\Titanium\mobilesdk\win32.4.0.GA\windows\cli\vendor\cmake\bin\cmake.exe in directory C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86
[INFO]  -- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
[INFO]  -- Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE)
[INFO]  -- Configuring done
[INFO]  -- Generating done
[INFO]  -- Build files have been written to: C:/Users/username/.titanium/vsbuild/cpi-app/phone.x86
[INFO]  Running MSBuild on solution: C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.sln
[INFO]  Windows Phone emulator is ready
[WARN]  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/done'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
[WARN]  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/cancel'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/checkin'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/leaders'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/events'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/groups'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/stream'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
[WARN]  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/cancel'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/checkin'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/done'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/events'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/groups'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
[WARN]  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/leaders'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/stream'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
[WARN]  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/done'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/cancel'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/checkin'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/leaders'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/events'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/groups'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/stream'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]


"C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.sln" (default target) (1) ->
"C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj.metaproj" (default target) (2) ->
"C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj" (default target) (6) ->
(_SplitResourcesPri target) ->
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/cancel'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/checkin'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/done'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/events'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
[WARN]  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/groups'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/leaders'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]
  MakePRI : warning 0xdef01051: No default or neutral resource given for 'Resources/stream'. The application may throw an exception for certain user configurations when retrieving the resources. [C:\Users\username\.titanium\vsbuild\cpi-app\phone.x86\CPInteriors.vcxproj]

    14 Warning(s)
    0 Error(s)

Time Elapsed 00:00:21.87
[INFO]  Writing build manifest: C:\Users\username\.titanium\vsbuild\cpi-app\build-manifest.json
[INFO]  Copying results back to project build directory
[INFO]  Finished building the application in 30s 892ms
[INFO]  Installing and launching the application. Please wait as this may take some time...
[INFO]  Installing dependency: Microsoft.VCLibs.x86.12.00.Phone.appx
[INFO]  Project built successfully in 30s 932ms

[INFO]  Installing the application...
[INFO]  Connected to app
-- Start application log -----------------------------------------------------
[INFO]  Database is up to date and running with migration version: 2
[INFO]  Logger printing some log text
[INFO]  Finished installing the application
[INFO]  Waiting for app to connect to log relay
[INFO]  Finished launching the application
-- End application log -------------------------------------------------------

虽然它在一年前变得稳定,但 Titanium SDK 对 Windows Phone 的支持仍然很差。为此 OS,几乎不可能在 Appcelerator 中创建功能齐全的应用程序。一些例子:

  • Ti.UI.SIZE 不支持
  • 日志输出仍然不可用
  • 如您所见,还有其他几个 GUI 问题