While I'm building my Nativescript app using Xcode, I'm getting the below error. May I know what is the reason? I'm able to build the app successfully in Xcode 11 but not in 13. Thanks in advance
Traceback (most recent call last):
File "./build-step-metadata-generator.py", line 42, in <module>
deployment_target = env(env("DEPLOYMENT_TARGET_CLANG_ENV_NAME"))
File "./build-step-metadata-generator.py", line 14, in env
return os.environ[env_name]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'DEPLOYMENT_TARGET_CLANG_ENV_NAME'
Command Ld failed with a nonzero exit code
Related
I'm trying to create an apk with buildozer and I get this error:
[WARNING]: prerequisites.py is experimental and does not support all prerequisites yet. [WARNING]: Please report any issues to the python-for-android issue tracker. [WARNING]: prerequisites.py is experimental and does not support all prerequisites yet. [WARNING]: Please report any issues to the python-for-android issue tracker. [INFO]: Will compile for the following archs: arm64-v8a, armeabi-v7a [INFO]: Found Android API target in $ANDROIDAPI: 31 Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1312, in <module> main() File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 734, in __init__ getattr(self, command)(args) File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 143, in wrapper_func ctx.prepare_build_environment(user_sdk_dir=self.sdk_dir, File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 273, in prepare_build_environment apis = get_available_apis(self.sdk_dir) File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 47, in get_available_apis targets = get_targets(sdk_dir) File "/mnt/c/pakagin2/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 35, in get_targets targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n') AttributeError: 'str' object has no attribute 'stdout'
I tried reinstalling everything and searching on google but I can't find a solution.
I suppose there is an error when it looks for api=31 because it stops there.
I also tried with google collab and it gives me the same error
I am packaging kivyMD app in Google colab. The app is source code of kitchen sink app from official github page of kivyMD.
Edit: Error occured after : !buildozer -v android debug
# Package the application
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python3.7/dist-packages/buildozer/__init__.py", line 1047, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python3.7/dist-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/usr/local/lib/python3.7/dist-packages/buildozer/target.py", line 104, in cmd_debug
self.buildozer.build()
File "/usr/local/lib/python3.7/dist-packages/buildozer/__init__.py", line 205, in build
self.target.build_package()
File "/usr/local/lib/python3.7/dist-packages/buildozer/targets/android.py", line 990, in build_package
version = self.buildozer.get_version()
File "/usr/local/lib/python3.7/dist-packages/buildozer/__init__.py", line 701, in get_version
with open(fn) as fd:
FileNotFoundError: [Errno 2] No such file or directory: './../../kivymd/__init__.py'
Full Output + Error File
Info: File Structure is same as source code
What should I do to handle this error.
Thanks in Advance
Try the following command:
buildozer android debug deploy run logcat
For this command you have to use usb debugging with your phone .
I have download the source code of Telegram app on their website:https://telegram.org/source.
When I try to run the project, there show an error like below:
UFW (M iphonesimulator): ERROR: Build failed
Traceback (most recent call last):
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in <module>
run_build()
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
add_symlinks_to_framework(project)
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 675, in add_symlinks_to_framework
attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 493, in attempt_symlink
os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1
I didn't change anything before I try to run the project.
Telegram uses currently retired project https://github.com/kstenerud/iOS-Universal-Framework
Install 'iOS-Universal-Framework' and with couple of additional fixes you will be able to build it.
OSError: [Errno 2] No such file or directory: '/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
You are referencing to a third party library that isn't there.
I have downloaded the code source of Telegram app on their website. When I open the project in Xcode 6.1.1, I get the following error:
UFW (M iphonesimulator): ERROR: Build failed Traceback (most recent call last): File"/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in <module>run_build()File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
add_symlinks_to_framework(project)
File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 675, in add_symlinks_to_framework
attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 493, in attempt_symlink
os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1
MtProtoKit requires https://github.com/kstenerud/iOS-Universal-Framework, so clone it, install "Real Framework", restart Xcode and enjoy!
With Xcode 6, https://github.com/kstenerud/iOS-Universal-Framework is not required for building universal (arm64, armv7, armv7s, and simulator) frameworks for iOS.
You need to remove run script, fix library dependence and Xcode architectures configuration, also confirm architectures of linked binaries.
I maintained a working telegram iOS source code here: https://github.com/liruqi/Telegram-iOS
I have a problem with the tibar (barcode scanner http://code.google.com/p/tibar/), when run on my iphone, xcode returns an error exit 65, I've outlined below:
** BUILD FAILED **
The following build commands failed:
Ld build/Scannn.build/Debug-iphoneos/Scannn.build/Objects-normal/armv6/Scannn normal armv6
(1 failure)
EXIT CODE WAS: 65
Exception detected in script:
Traceback (most recent call last):
File "/Users/xxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1465, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1224, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/run.py", line 41, in run
sys.exit(rc)
SystemExit: 65
if I run the application directly in xcode, it works correctly.
My configuration:
Titanium SDK: 2.0.1.GA2
XCode: 4.3.2
iOS: 5.1.1 (iphone 4s)
Tibar: 0.4.2
Thanks!!!