应用加速器:无法在 Studio 更新后运行或发布应用



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

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

Error encountered during update
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.readConfig (C:UsersWorkerAppDataRoamingnvmv9.4.0node_modulesappceleratorlibutil.js:728:30)
at Object.<anonymous> (C:UsersWorkerAppDataRoamingnvmv9.4.0node_modulesappceleratorbinappc: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(我有更新的版本(,但没有任何帮助。

通过工作室更新 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$1.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:ProgramDataTitaniummobilesdkwin327.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:ProgramDataTitaniummobilesdkwin326.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)Javajdk1.8.0_162
Genymotion
  Path                        = C:Program FilesGenymobileGenymotion
  Genymotion Executable       = C:Program FilesGenymobileGenymotiongenymotion.exe
  Genymotion Player           = C:Program FilesGenymobileGenymotionplayer.exe
  Home                        = C:UsersWorkerAppDataLocalGenymobileGenymotion
VirtualBox
  Executable                  = C:Program FilesOracleVirtualBoxVBoxManage.exe
  Version                     = 5.2.0r118431
Android SDK
  Android Executable          = not found
  ADB Executable              = C:android-sdk-winplatform-toolsadb.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-winplatformsandroid-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:UsersWorker.androidavdAVD_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:UsersWorker.androidavdtitanium_1_WVGA800.avd
    SD Card                   = C:UsersWorker.androidavdtitanium_1_WVGA800.avdsdcard.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. Unistall 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。

最新更新