目前,Apportable 无法构建具有相同名称的目标的项目。这是由于子项目而发生的。我有几个子项目,它们都包含名为iOS Static Library
和OS X Static Library
. 并且它们PRODUCT_NAME
被覆盖以防止.a
文件名重复。
无论如何,当我看到构建日志时,Apportable 似乎使用目标名称作为一种全局标识符。并在构建时崩溃。
如何在多个子项目中使用同名目标?
这是完整的构建日志。
Erionirr:Test9 Eonil$ apportable uninstall; rm -rf ~/.apportable/SDK/Build/android-armeabi-debug; rm -rf *.approj; apportable debug
Building to /Users/Eonil/.apportable/SDK/Build/android-armeabi-debug
Loading configuration.
Finished parsing configuration.
Loading configuration.
Finished parsing configuration.
Loading configuration.
Finished parsing configuration.
scons: Building targets ...
scons: *** [Build/android-armeabi-debug/Test9/Test9-debug.apk_debug] Source `Build/android-armeabi-debug/Test9/Test9-debug.apk' not found, needed by target `Build/android-armeabi-debug/Test9/Test9-debug.apk_debug'.
scons: building terminated because of errors.
Building to /Users/Eonil/.apportable/SDK/Build/android-armeabi-debug
Updating configuration parameters... Building Xcode project /Users/Eonil/Desktop/Apportable Knowledge Base and Bug Reporting/Running Test/Test9/Test9
Scanning build configuration for target Test9
Merging configuration parameters.
It looks like you're compiling this app for the first time.
Test9.approj/configuration.json will be created for you.
A few quick questions and you'll be on your way:
If the app is using OpenGL ES, does it use ES1 or ES2? (Cocos2D 1.X uses ES1, 2.X uses ES2)
[1/2] 2
Should the app initially launch in landscape or portrait orientation? (default: landscape)
[L/p] p
Loading configuration.
Finished parsing configuration.
Merging configuration parameters.
Loading configuration.
Finished parsing configuration.
Merging configuration parameters.
Loading configuration.
Finished parsing configuration.
Traceback (most recent call last):
File "/Users/Eonil/.apportable/SDK/bin/apportable", line 701, in <module>
run(env)
File "/Users/Eonil/.apportable/SDK/bin/apportable", line 677, in run
results = actions[args.action](env)
File "/Users/Eonil/.apportable/SDK/bin/apportable", line 95, in DebugAction
return env.DebugApp(site_init.BuildApplication(env, env['BUILD_TARGET']))
File "/Users/Eonil/.apportable/SDK/site_scons/site_init.py", line 351, in BuildApplication
return build.App(env, app_sconscript)
File "/Users/Eonil/.apportable/SDK/site_scons/build/__init__.py", line 619, 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/Eonil/.apportable/SDK/lib/scons/engine/SCons/Environment.py", line 223, in __call__
return self.method(*nargs, **kwargs)
File "/Users/Eonil/.apportable/SDK/site_scons/site_init.py", line 915, in BuildApp
build.Module(env, module["build_cwd"], module)
File "/Users/Eonil/.apportable/SDK/site_scons/build/__init__.py", line 681, in Module
env.BuildModule(target["target"], sources=sources, header_paths=headers, defines=defines, flags=flags, 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/Eonil/.apportable/SDK/lib/scons/engine/SCons/Environment.py", line 223, in __call__
return self.method(*nargs, **kwargs)
File "/Users/Eonil/.apportable/SDK/site_scons/site_init.py", line 1014, in BuildModule
BuildLibrary(env, name, sources=sources, header_paths=header_paths, static=True, defines=defines, flags=flags, deps=deps, libs=libs, pch=pch, app=True)
File "/Users/Eonil/.apportable/SDK/site_scons/site_init.py", line 755, in BuildLibrary
lib = building_env.StaticLibrary(name, objects)
File "/Users/Eonil/.apportable/SDK/lib/scons/engine/SCons/Environment.py", line 259, in __call__
return MethodWrapper.__call__(self, target, source, *args, **kw)
File "/Users/Eonil/.apportable/SDK/lib/scons/engine/SCons/Environment.py", line 223, in __call__
return self.method(*nargs, **kwargs)
File "/Users/Eonil/.apportable/SDK/lib/scons/engine/SCons/Builder.py", line 632, in __call__
return self._execute(env, target, source, OverrideWarner(kw), ekw)
File "/Users/Eonil/.apportable/SDK/lib/scons/engine/SCons/Builder.py", line 556, in _execute
_node_errors(self, env, tlist, slist)
File "/Users/Eonil/.apportable/SDK/lib/scons/engine/SCons/Builder.py", line 315, in _node_errors
raise UserError(msg)
SCons.Errors.UserError: Multiple ways to build the same target were specified for: Build/android-armeabi-debug/Eonil.Test9/iOS Static Library/libiOS Static Library.a (from ['Build/android-armeabi-debug/Eonil.Test9/Users/Eonil/Desktop/Apportable Knowledge Base and Bug Reporting/Running Test/Test9/Subproject1/Subproject1/Subproject1.m.o'] and from ['Build/android-armeabi-debug/Eonil.Test9/Users/Eonil/Desktop/Apportable Knowledge Base and Bug Reporting/Running Test/Test9/Subproject2/Subproject2/Subproject2.m.o'])
Erionirr:Test9 Eonil$