Windows上的Appcelerator:找不到有效的Android SDK目标

Windows上的Appcelerator:找不到有效的Android SDK目标

问题描述:

我试图在安装了棉花糖6.0的三星Galaxy S6上运行Appcelerator中的应用程序.我已经下载了Android Studio,并使用SDK Manager为操作系统下载了SDK.但是,当尝试运行我的代码时,控制台会输出以下错误:

I'm trying to run an app on my Samsung Galaxy S6 installed with Marshmallow 6.0 in Appcelerator. I have downloaded Android Studio and used the SDK Manager to download the SDK for the OS. However, when trying to run my code, the console outputs these errors:

[ERROR] : No valid Android SDK targets found.
[ERROR] : Please download an Android SDK target API level 23 or newer from the Android 
          SDK Manager.

我尝试卸载棉花糖6.0的API级别23,然后直接通过管理器而不是通过Studio的安装来重新安装它,但这不能解决问题. Appcelerator 能够检测我的设备,并且在我的S6上启用了开发人员模式以及USB调试.

I tried uninstalling the API level 23 for Marshmallow 6.0 and reinstalling it directly through the manager rather than through installation of the studio, but this did not fix the issue. Appcelerator is able to detect my device, and developer mode as well as USB debugging are enabled on my S6.

如何让Appcelerator接受SDK目标API级别23?

How do I get Appcelerator to accept the SDK target API level 23?

我遇到了同样的问题,可能是在Java更新之后或由于Android SDK更新(我不确定).

I have had the same problem, probably after Java was updated or because of Android SDK update (i'm not sure yet).

我设法通过在CLI中输入以下内容来解决此问题,以选择要构建的特定Android SDK:

I managed to solve this problem by entering this in the CLI to select a specific Android SDK to build:

ti config android.buildTools.selectedVersion 23.0.3

请注意,这只是暂时的解决方案,但是您可能希望及时将其更新为更新的SDK版本.

Note that this is just a temporary solution to get going, but you might want to update this to a newer SDK version in time.

最佳解决方案(在Windows上):转到偏好设置">"Studio">平台">"Android".点击安装SDK",然后选择/安装Android 6.0 SDK.

Best solution (on Windows): Go to Preferences > Studio > Platforms > Android. Click "Install SDK" and select/install Android 6.0 SDK.

更新: 查看更多