Appcelerator:Studio 更新后无法 运行 或发布应用

Appcelerator: Can't run or publish apps after Studio Update

我在 Windows 10 更新了 Appcelerator Studio。在此过程中,我收到一条消息,提示更新过程中出现错误,应该重新启动 Studio。

现在我无法 运行 或发布应用程序(组合框为灰色),并且在每次 运行 期间,Appcelerator Studio 都会通知要安装更新:Appcelerator CLI 核心(必需)版本为 N/A。如果我尝试安装它,我会收到以下错误:

Error encountered during update
undefined:1

SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.readConfig (C:\Users\Worker\AppData\Roaming\nvm\v9.4.0\node_modules\appcelerator\lib\util.js:728:30)
at Object.<anonymous> (C:\Users\Worker\AppData\Roaming\nvm\v9.4.0\node_modules\appcelerator\bin\appc:96:23)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)

如果我在使用 N/A 版本的 Appcelerator CLI 核心(必需)时遇到问题,我总是从命令行使用 appc setup 并解决了问题。但是现在,如果我输入它,我会得到同样的错误。

我尝试重新安装 Appcelerator、Node(我已经更新了版本)但没有任何帮助。

通过 Studio 更新 CLI 时的错误输出:

STATUS
------
pluginId            com.appcelerator.titanium.core
pluginVersion       3.1.2.1512467051
code                0
severity            4
message             HIDDEN
fingerprint         [some_value_here]
stacktrace          

Exception:org.eclipse.epp.internal.logging.aeri.ui.log.StandInStacktraceProvider$StandInException: HIDDEN
 at com.aptana.core.logging.IdeLog.log(IdeLog.java:563)
 at com.aptana.core.logging.IdeLog.log(IdeLog.java:598)
 at com.aptana.core.logging.IdeLog.logError(IdeLog.java:306)
 at com.aptana.core.logging.IdeLog.logError(IdeLog.java:280)
 at com.aptana.core.logging.IdeLog.logError(IdeLog.java:258)
 at com.appcelerator.titanium.core.StudioVersionManager.getCLIActiveVersion(StudioVersionManager.java:139)
 at com.appcelerator.titanium.core.StudioVersionManager.isCurrentCLIVersionCompatibile(StudioVersionManager.java:78)
 at com.appcelerator.titanium.core.StudioVersionManager.isActiveCLICompatible(StudioVersionManager.java:49)
 at com.appcelerator.titanium.update.core.release.TitaniumStudioRelease.getUpdatesWithStableStream(TitaniumStudioRelease.java:219)
 at com.appcelerator.titanium.update.core.release.TitaniumStudioRelease.isInstalled(TitaniumStudioRelease.java:212)
 at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater$NotInstalledFilter.include(TitaniumReleasesUpdater.java:105)
 at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater$NotInstalledFilter.include(TitaniumReleasesUpdater.java:1)
 at com.aptana.core.util.AndFilter.include(AndFilter.java:39)
 at com.aptana.core.util.CollectionsUtil.filterInPlace(CollectionsUtil.java:249)
 at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater.filterToRelevantUninstalledUpdates(TitaniumReleasesUpdater.java:915)
 at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater.getStudioUpdates(TitaniumReleasesUpdater.java:326)
 at com.appcelerator.titanium.update.internal.core.TitaniumReleasesUpdater.getAvailableUpdates(TitaniumReleasesUpdater.java:314)
 at com.appcelerator.titanium.update.ui.handler.TitaniumUpdateHandler.run(TitaniumUpdateHandler.java:66)
 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

------
REPORT
------
name                [email_I_use_to_log_in]
email               anonymous
comment             
productVersion      5.0.0.201712081732
productName         Appcelerator Studio
javaRuntimeVersion  1.8.0_162-b12
osgiWs              win32
osgiOs              Windows 10
osgiOsVersion       10.0.0
osgiArch            x86

ti info 请求的输出:

Operating System
  Name                        = Microsoft Windows 10 Home
  Version                     = 10.0.16299
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 7.9GB

Node.js
  Node.js Version             = 8.9.4 //I set to 8.9.4 but had same errors with 9.4.0
  npm Version                 = 5.6.0

Titanium CLI
  CLI Version                 = 5.0.14
  node-appc Version           = 0.2.41

Titanium SDKs
  7.0.0.GA
    Version                   = 7.0.0
    Install Location          = C:\ProgramData\Titanium\mobilesdk\win32.0.0.GA
    Platforms                 = android, windows
    git Hash                  = f09dec4
    git Timestamp             = 12/5/2017 21:33
    node-appc Version         = 0.2.43
  6.2.2.GA
Version                   = 6.2.2
Install Location          = C:\ProgramData\Titanium\mobilesdk\win32.2.2.GA
    Platforms                 = android, mobileweb, windows
    git Hash                  = 42c7196
    git Timestamp             = 9/19/2017 23:04
    node-appc Version         = 0.2.43

/****
Here is more SDKS
****/  

Intel® Hardware Accelerated Execution Manager (HAXM)
  Not installed

Java Development Kit
  Version                     = 1.8.0_162
  Java Home                   = C:\Program Files (x86)\Java\jdk1.8.0_162

Genymotion
  Path                        = C:\Program Files\Genymobile\Genymotion
  Genymotion Executable       = C:\Program Files\Genymobile\Genymotion\genymotion.exe
  Genymotion Player           = C:\Program Files\Genymobile\Genymotion\player.exe
  Home                        = C:\Users\Worker\AppData\Local\Genymobile\Genymotion

VirtualBox
  Executable                  = C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
  Version                     = 5.2.0r118431

Android SDK
  Android Executable          = not found
  ADB Executable              = C:\android-sdk-win\platform-tools\adb.exe
  SDK Path                    = C:\android-sdk-win

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

Android Platforms
  1) android-23
    Name                      = Android 6.0
    API Level                 = 23
    Revision                  = 3
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320
    ABIs                      = armeabi-v7a, x86, x86_64
    Path                      = C:\android-sdk-win\platforms\android-23

 Android Add-Ons
  None

Android Emulators
  AVD_for_Nexus_6
    ID                        = AVD_for_Nexus_6
    SDK Version               = not installed
    ABI                       = armeabi-v7a
    Skin                      = 1440x2560
    Path                      = C:\Users\Worker\.android\avd\AVD_for_Nexus_6.avd
    SD Card                   = no sd card
    Google APIs               = no
  titanium_1_WVGA800
    ID                        = titanium_1_WVGA800
    SDK Version               = not installed
    ABI                       = armeabi-v7a
    Skin                      = wvga800
    Path                      = C:\Users\Worker\.android\avd\titanium_1_WVGA800.avd
    SD Card                   = C:\Users\Worker\.android\avd\titanium_1_WVGA800.avd\sdcard.img
    Google APIs               = no

/****
Here is the list Genymotion Emulators
****/

Connected Android Devices
  None

Microsoft (R) Visual Studio
  14.0 (selected)
    Path                      = C:\Program Files (x86)\Microsoft Visual Studio 14.0\
    CLR Version               = v4.0.30319
    MSBuild Version           = vnull
    Windows Phone SDKs        = not installed

Microsoft (R) Windows Phone SDK
  No versions found

Windows PowerShell
    Enabled                   = yes

Windows Phone Emulators
10.0

Windows Phone Devices

Android Issues
  !  Unable to locate an Android NDK.
     Without the NDK, you will not be able to build native Android Titanium modules.
     If you have already downloaded and installed the Android NDK, you can tell Titanium where the
     Android NDK is located by running 'titanium config android.ndkPath /path/to/android-ndk',
     otherwise you can install it by running 'titanium setup android' or manually downloading from
     http://appcelerator.com/android-ndk.

  !
     Android Build Tools 27.0.0 are too new and may or may not work with Titanium.
     If you encounter problems, select a supported version with:
        ti config android.buildTools.selectedVersion ##.##.##
      where ##.##.## is a version in  that is 26.x

Windows Issues
  ×  Microsoft Windows Phone SDK not found.
     You will be unable to build Windows Phone apps.
     You can install it from http://appcelerator.com/windowsphone.

我该如何解决这个问题?

问题终于解决了。

说明:

  1. 卸载 Appcelerator Studio。
  2. 删除目录设置:

    .android .appcelerator .titanium

  3. 卸载 npm 模块:

    npm uninstall -g titanium npm uninstall -g alloy npm uninstall -g acs npm uninstall -g appcelerator

  4. 重新安装 Appcelerator Studio。

  5. 如果仍有问题:关闭 Appcelerator Studio,键入 appc setup 并重新启动 Appcelerator Studio。