可分配的项目编译错误

时间:2013-07-24 05:02:54

标签: debugging build apportable

我从xcode 4.6.2项目中得到了这个编译错误。我测试了其中两个,它总是停在同一个地方。我在这两个代码中都没有发现任何错误。我该怎么办?

我在两个项目上都做了可靠的构建。这是日志。还有什么更有用的帮助我识别错误吗?

jinfe apple $ apportable build

Building with TARGET_ARCH_ABI:armeabi ARM_NEON:False
Building to /Users/apple/.apportable/SDK/Build/android-armeabi-debug
Loading configuration.
Finished parsing configuration.
Traceback (most recent call last):
  File "/Users/apple/.apportable/SDK/bin/apportable", line 739, in <module>
    run(env)
  File "/Users/apple/.apportable/SDK/bin/apportable", line 705, in run
    results = actions[args.action](env)
  File "/Users/apple/.apportable/SDK/bin/apportable", line 77, in BuildAction
    site_init.BuildApplication(env, env['BUILD_TARGET'])
  File "/Users/apple/.apportable/SDK/site_scons/site_init.py", line 359, in BuildApplication
    return build.App(env, app_sconscript)
  File "/Users/apple/.apportable/SDK/site_scons/build/__init__.py", line 628, in App
    results = env.BuildApp(sources=sources, header_paths=headers, defines=defines, flags=flags, config=configs, deps=deps, libs=libs, java_libs=java_libs, assets=assets, pch=pchs, modules=modules, java_sources=java_sources, java_sourcepaths=java_sourcepaths, java_res_dirs=java_res_dirs)
  File "/Users/apple/.apportable/SDK/lib/scons/engine/SCons/Environment.py", line 223, in __call__
    return self.method(*nargs, **kwargs)
  File "/Users/apple/.apportable/SDK/site_scons/site_init.py", line 997, in BuildApp
    lib = BuildLibrary(env, env['XCODEBUILD_TARGET'], sources=sources, header_paths=header_paths, static=True, defines=defines, flags=flags, deps=deps, libs=libs, pch=pch, app=True, java_libs=java_libs)
  File "/Users/apple/.apportable/SDK/site_scons/site_init.py", line 632, in BuildLibrary
    build.headermap.dump(f, path['hmap'])
  File "/Users/apple/.apportable/SDK/site_scons/build/headermap.py", line 194, in dump
    string_table.write(s + '\0')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-18: ordinal not in range(128)

- 这是第二个日志

CityWar apple$ apportable build
Building with TARGET_ARCH_ABI:armeabi ARM_NEON:False
Building to /Users/apple/.apportable/SDK/Build/android-armeabi-debug
Loading configuration.
Finished parsing configuration.
Traceback (most recent call last):
  File "/Users/apple/.apportable/SDK/bin/apportable", line 739, in <module>
    run(env)
  File "/Users/apple/.apportable/SDK/bin/apportable", line 705, in run
    results = actions[args.action](env)
  File "/Users/apple/.apportable/SDK/bin/apportable", line 77, in BuildAction
    site_init.BuildApplication(env, env['BUILD_TARGET'])
  File "/Users/apple/.apportable/SDK/site_scons/site_init.py", line 359, in BuildApplication
    return build.App(env, app_sconscript)
  File "/Users/apple/.apportable/SDK/site_scons/build/__init__.py", line 628, in App
    results = env.BuildApp(sources=sources, header_paths=headers, defines=defines, flags=flags, config=configs, deps=deps, libs=libs, java_libs=java_libs, assets=assets, pch=pchs, modules=modules, java_sources=java_sources, java_sourcepaths=java_sourcepaths, java_res_dirs=java_res_dirs)
  File "/Users/apple/.apportable/SDK/lib/scons/engine/SCons/Environment.py", line 223, in __call__
    return self.method(*nargs, **kwargs)
  File "/Users/apple/.apportable/SDK/site_scons/site_init.py", line 997, in BuildApp
    lib = BuildLibrary(env, env['XCODEBUILD_TARGET'], sources=sources, header_paths=header_paths, static=True, defines=defines, flags=flags, deps=deps, libs=libs, pch=pch, app=True, java_libs=java_libs)
  File "/Users/apple/.apportable/SDK/site_scons/site_init.py", line 632, in BuildLibrary
    build.headermap.dump(f, path['hmap'])
  File "/Users/apple/.apportable/SDK/site_scons/build/headermap.py", line 194, in dump
    string_table.write(s + '\0')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 33-36: ordinal not in range(128)

1 个答案:

答案 0 :(得分:1)

我怀疑头文件中有非ASCII字符。要进行分析,请将日志记录添加到$ HOME / .apportable / SDK / site_scons / build / headermap.py,如:

     for s in string_tbl:
+        print 'header is ' + s
         string_pos[s] = string_table.tell()
         string_table.write(s + '\0')