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

时间:2016-08-17 07:37:19

标签: windows-phone-8.1 windows-phone appcelerator appcelerator-titanium appcelerator-mobile

我一直试图将钛项目添加到Windows手机上。遗憾的是,对于我遇到的几个问题,文档并没有特别有用。请注意,我已尝试使用大量Google搜索的新项目进行全新安装,但仍然没有任何运气。哦,我只使用CLI,因为我有更糟糕的GUI问题

我认为第一个最令人烦恼的事情是,日志记录模块在应用程序加载后才会被删除,因此我无法记录任何内容,不知道该怎么做。

其次是布局问题。我认识到Windows手机有不同的元素,风格不同,但在文本区域有巨大的边缘我无法摆脱。

第三,我尝试包含一个选择器,但是,一旦打开就无法设置背景,也无法调整主题(默认为黑暗),加上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\5.4.0.GA
  Target Platform             = windows

Command
  C:\Program Files\nodejs\node.exe C:\Users\username\.appcelerator\install\5.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\5.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 -------------------------------------------------------

1 个答案:

答案 0 :(得分:0)

虽然它在一年前变得稳定,但对Windows Phone的Titanium SDK支持仍然很差。在Appcelerator中为该操作系统创建功能完备的应用程序几乎是不可能的。一些例子:

  • 不支持Ti.UI.SIZE
  • 日志输出仍然不可用
  • 正如您所发现的,还有其他一些GUI问题