Appcelerator Studio 无法在 Mac 上检测到有效的 iOS 或 Android SDK

Appcelerator Studio Cannot Detect Valid iOS nor Android SDK on Mac

即使安装了 XCode、iOS 和 Android SDK。 Appcelerator 未检测到 iOS 或 Android SDK 并显示错误:

Could not detect a valid SDK with version '6' or higher at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

我安装了最新的 Appcelerator Studio,Oracle JDK 8,NodeJS 12.16.2,XCode 10.1,Android Studio 3.6.2

我尝试重新安装 Appcelerator Studio、Oracle JDK、Node JS,在 preferences-Platforms 下设置 sdk 路径并重新启动我的 Mac 多次,但仍然出现相同的错误。

这是来自终端的 appc 信息:

Appcelerator Command-Line Interface, version 8.0.0
Copyright (c) 2014-2020, Appcelerator, Inc.  All Rights Reserved.

Operating System
  Name                        = Mac OS X
  Version                     = 10.13.6
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 4.0GB

Node.js
  Node.js Version             = 12.16.2
  npm Version                 = 6.14.4

Appcelerator CLI
  Installer                   = 5.0.0
  Core Package                = 8.0.0

Titanium CLI
  CLI Version                 = 5.2.2
  node-appc Version           = 0.2.49

Titanium SDKs
  9.0.0.GA
    Version                   = 9.0.0
    Install Location          = /Users/posuna/Library/Application Support/Titanium/mobilesdk/osx/9.0.0.GA
    Platforms                 = iphone, android
    git Hash                  = ff53751424
    git Timestamp             = 3/4/2020 14:47
    node-appc Version         = 0.3.4

Mac OS X
  Command Line Tools          = installed

Intel® Hardware Accelerated Execution Manager (HAXM)
  Not installed

Java Development Kit
  Version                     = 1.8.0_241
  Java Home                   = /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home

Genymotion
  Path                        = not found
  Genymotion Executable       = not found
  Genymotion Player           = not found
  Home                        = not found

VirtualBox
  Executable                  = not found
  Version                     = unknown

Android SDK
  Android Executable          = not found
  ADB Executable              = not found
  SDK Path                    = not found

Android NDK
  NDK Path                    = not found
  NDK Version                 = not found

Android Platforms
  None

Android Add-Ons
  None

Android Emulators
  None

Genymotion Emulators
  None

Connected Android Devices
  None

Xcode
  10.1 (build 10B61) - Xcode default
    Install Location          = /Applications/Xcode.app/Contents/Developer
    iOS SDKs                  = 12.1
    iOS Simulators            = none
    Watch SDKs                = 5.1
    Watch Simulators          = none
    Supported by TiSDK 9.0.0.GA = yes
    EULA Accepted             = yes
    Teams                     = none

在授予我的用户对 ~/.config 文件夹的读写权限并确保 Android SDK 工具和 Android SDK 构建工具安装在 Android SDK 文件夹下。

在调试中启动 appcelerator 后,终端输出错误:

2020-04-20T21:53:20.877Z appcd:default-plugins:lerna error An unexpected error occurred: "EACCES: permission denied, scandir '/ Users/posuna/.config/yarn/link'".

我按照以下 axway 社区建议的步骤修复了错误:Axway Community

  1. 授予您的用户对“~/.config”文件夹的读写权限,方法是按住 Control 键并单击该文件夹,然后单击“获取信息”,然后单击“共享和权限”,然后将您的用户名添加为读写特权,然后在设置下单击应用到随附的项目。在我的 mac 中,这是路径“Macintosh HD/Users/MyUsername/.config”上的一个隐藏文件夹
  2. 完全关闭 Appcelerator Studio。
  3. 在终端运行命令“appc appcd stop”
  4. 删除文件夹“~/.appcelerator/appcd/plugins”。在我的 mac 中,这是路径“Macintosh HD/Users/MyUsername/”
  5. 上的一个隐藏文件夹
  6. 运行 命令“appc appcd start --debug”
  7. 一旦您开始看到 CPU 参数作为上述命令的一部分,再次启动 Appcelerator Studio 并检查首选项->Studio->平台->iOS。它应该识别指定路径上的 iOS sdk。在我的例子中是“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer”

我遇到了同样的问题。 通过创建一个符号 link 来解决它。 就我而言: ln -s /Users/ronnyvanelewyck/Library/android-sdk-macosx /Users/ronnyvanelewyck/Library/Android/sdk

显然守护进程只在 /Users/ronnyvanelewyck/Library/Android/sdk 中寻找 Android。

问候 罗尼