有人可以帮我解决这个错误吗,我似乎无法确定问题所在。我也是使用 Scons 的新手。我需要通过这个来获取 .aar 和 .apk 文件。我正在将 Iotivity 用于一个项目,该项目允许用户在没有互联网的任何平台的设备之间共享传输图像。
命令提示符:
C:\Users\derrick\Desktop\iotivity-2.0.1.1\iotivity-2.0.1.1>scons TARGET_OS=android
scons: Reading SConscript files ...
Processing using SCons version 3.1.1
Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)] on win32
NameError: name 'host_arch' is not defined:
File "C:\Users\derrick\Desktop\iotivity-2.0.1.1\iotivity-2.0.1.1\SConstruct", line 32:
SConscript('build_common/SConscript')
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 668:
return method(*args, **kw)
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\derrick\Desktop\iotivity-2.0.1.1\iotivity-2.0.1.1\build_common\SConscript", line 1025:
env.SConscript(target_os + '/SConscript')
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\derrick\Desktop\iotivity-2.0.1.1\iotivity-2.0.1.1\build_common\android\SConscript", line 19:
SConscript('#/extlibs/android/ndk/SConscript')
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 668:
return method(*args, **kw)
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "c:\python27\lib\site-packages\scons\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\derrick\Desktop\iotivity-2.0.1.1\iotivity-2.0.1.1\extlibs\android\ndk\SConscript", line 24:
if host_arch in ['x86_64']: