问题
When attempting to create a new project in Android Studio 1.3.1 (Win 8.1), I am not able to select "Glass" on the "Target Android Devices" screen. The Glass SDK is not selectable (disabled) and shows "Glass (Not Installed)".
However, when I examine the SDK Manager, it shows the "Glass Development Kit Preview, Android 19, Rev 11" listed under Android 4.4 (KitKat) as installed. I see it as Installed in both the new Default Settings | Appearance & Behavior | System Settings | Android SDK and in the old standalone SDK Manager.
I have already tried deleting the Glass Development Kit Preview and re-installing it, but that has not helped. Additionally, all my old Glass projects still build and run just fine.
Per the advice in Google Glass (Not installed), I have verified that I have installed the latest and greatest Android SDK Tools, Android SDK Platform-tools, and Android SDK Build-tools (for all Releases from 20-23). I have also verified (via the Default Settings | Appearance & Behavior | System Settings | Android SDK screen) and in File | Project Structure | SDK Location that my Android SDK is in the correct and expected location (i.e., not in the same folder as Android Studio).
Any ideas on how to get Android Studio to recognize the Glass SDK is installed?
回答1:
I had this exact problem until yesterday. The ultimate fix was a downgrade from Android Studio 1.3.1 to 1.2.1.1
Supposedly some of the files that Glass requires are no longer included in the newest version. Another issue that you will run into when installing the older version of Android Studio is that a list of errors appears when you run it for the first time. Simply turn off your wifi for the first time that you open it and you will be golden. You can turn on your wifi after the application opens and will not receive the errors again.
Frustrating fix, I know. Good luck! Feel free to leave a reply if this does not work.
回答2:
This has been fixed in the most recent Android Studio 1.5 preview. If you go to your updates settings, and change to the canary channel you will be able to install the update, and build GDK apps again.
来源:https://stackoverflow.com/questions/32162279/android-studio-1-3-1-and-google-glass-create-new-project-target-android-dev