GDK for Android Studio 3.0.1? - android-studio

I'm an Android newbie tasked with creating a simple app for Google Glass XE23.
I have downloaded & installed Android Studio 3.0.1, but find nothing in it related to Glass.
ALL search results are old and refer to much older versions of AS. That includes anything I find at Google's Glass developer's site.
The AS Messages window contains:
Gradle 'gdk-apidemo-sample' project refresh failed
Error:failed to find target Google Inc.:Glass Development Kit Preview:19 : C:\Users\Allan\AppData\Local\Android\Sdk
How/where do I get the GDK package?

In the Android Sdk Manager make sure to check Show Package Details. Then you see all package options and can install the GDK easily.
Android SDK Manager can be found at Settings > Appearance & Behavior > System Settings > Android SDK.

Something that worked for me was going to the apps build.gradle file and changing the compileSdkVersion to "Google Inc.:Glass Development Kit Preview:19". Android Studio should throw an error and prompt you to install the module using component installer.
Here's what that looks like:
compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
You should get a prompt after trying to sync the gradle files again.

Related

Android Studio C++ Support Missing

I just installed Android Studio 3.6.3 on Windows 10 and I created a new Native C++ project. I can build and run the native project and I can debug Java code in the project.
The problems I'm having are:
I can't step into the C++ code when debugging
I can't set breakpoints in *.cpp files.
When I right click folders in the project view to add a new file, I only see options to add Java, Kotlin, and Android platform files. There aren't any options to add C++ source or header files.
When I open a C++ file Android Studio recommends installing plugins supporting *.cpp. The plugin it's recommending is for Arma 3 plugin development.
The "Attach Debugger To Process" menu only has Java as a debugger option. That list should also contain Native, Dual, and Auto.
I've made sure to install CMake and NDK (Side By Side) in the SDK Manager and I've configured the NDK in the project settings. I've tried reinstalling Android Studio 3.6.3 and I've also downloaded Android Studio 4.0 RC 1, but I have the same problems.
What steps am I missing to get C++ support in Android Studio?
Managed to get it working. Turns out just running the uninstaller wasn't enough, I had to follow the steps in this answer to completely uninstall Android Studio. I then reinstalled and everything seems to be good.

In my Android Studio SDK Manager Tools there is no NDK, LLDB, CMake

I follow this Install and configure NDK document:
In this step,
I found in my Android Studio there is no NDK, LLDB, CMake and so on:
EDIT-01
I found many disable sites in my SDK Updates Sites:
The Android update site is either disabled or has an error (not sure exactly what that icon means; if you mouse over it there might be a tooltip). You need to fix that. You can't download things from the repository if all of your repositories are disabled.

Hot to fix Android Studio's documentation lookup "Documentation not found"

I cant seem to get flutter based documentation on android studio when i select quick documentation (control Q)
I have tried reinstalling android studio and have tried re-applying the documentation in the SDK manager.
I expect there to be some documentation of what methods are in the class
Try installing this Extention
Install Android Studio
Android Studio offers a complete, integrated IDE experience for Flutter.
Android Studio, version 3.0 or later
Alternatively, you can also use IntelliJ:
IntelliJ IDEA Community, version 2017.1 or later
IntelliJ IDEA Ultimate, version 2017.1 or later
Install the Flutter and Dart plugins
To install these:
Start Android Studio.
Open plugin preferences (Preferences > Plugins on macOS, File >
Settings > Plugins on Windows & Linux).
Select Browse repositories, select the Flutter plugin and click
Install.
Click Yes when prompted to install the Dart plugin.
Click Restart when prompted. Ne

How to update SDK in Android Studio in the background

Today I'm trying to update the SDK in Android Studio on my Ubuntu, and looking for the menu that make the download process running in the background. So I want to download the SDK and continue to work in Android Studio.
As far as I can remember Eclipse has menu that can download in the background task so I can continue work while downloading.
I've tried to find the option in settings but I could not find it, and on the downloading GUI has no option to download it in the background, here is my screenshot:
Is anyone having the same issue here? How can I resolve this?
You can go to tools -> android -> sdk manager and click on Launch stand alone sdk manager hyperlink. This will open sdk manager outside android studio, select the packages and download. You can continue to work on android studio this way.
The "Launch standalone SDK Manager" option seems to be gone in Android Studio 2.3.3 for Windows. However, there is sdkmanager.bat in \tools\bin
It is possible to do it all by code using the sdkmanager tool.
The sdkmanager is a command line tool that allows you to view,
install, update, and uninstall packages for the Android SDK.
This is an example using the sdkmanager with the command line:
First at all, the sdkmanager is located in android_sdk/tools/bin/.
Go where the sdkmanager is located
List installed and available packages using this command:
sdkmanager --list
The result willl be something similar to this
In my case I want to Download a System Image with Release Name "P" with ABI x86 ( I saw this information from Android Studio)
The next step is to search that system image in your list
Finally install this package in this way:
./sdkmanager "system-images;android-P;google_apis;x86"
This will begin the process of downloading the package
After finish you can check that the image is available to use
For more info: https://developer.android.com/studio/command-line/sdkmanager.html#usage
Upgrade to latest version of Android Studio (Currently in 2.3.1).
It now support download (both SDK and plugins) in background.

Open cocos2d-x-3.7 in Android Studio

What is the proper way to open cocos2d-x-3.7 in Android Studio?
I tried:
Open existing project in Android Studio project > Choose proj.android-studio directory (In another attempt, I also tried to choose the base directory MyGame)
Run
Error: couldn't find "libcocos2dcpp.so.
Moreover, it also does Classes directory in the Project.
Android Studio is only partially supported in cocos2d-x 3.7 and 3.8. With the default project you will only be able to run your app without debugging using Android Studio.
Prior to running your app in Android Studio you will have to compile using the Android Studio flag:
cocos compile -p android --android-studio
You will have to run this command after any changes to your app are made, since the default Android Studio currently doesn't compile your project.
Furthermore the default Android Studio project does not include the Classes directory.
Suggestion: Use Eclipse or Xcode to develop your cocos2d-x projects for now. Hopefully future versions of cocos2d-x will have better support for Android Studio out of the box, this is critical considering Google is dropping support for Eclipse.
When you try to run the application on Android Studio, you get the error couldn't find "libcocos2dcpp.so" because it doesn't have the NDK for building your game.
I recommend you to compile proj.android and import that, cocos2d-x 3.7 doesn't support full Android Studio yet. Do this:
cocos compile -p android
Then import your proj.android to Android Studio.
Now you can run your application but you won't able to debug it, bad news (it will just install the APK on your device or virtual device).
Hope it helps.
Error: couldn't find "libcocos2dcpp.so.
For this you need to compile android studio project first so .so files and classes folder will be generated.
Open your command line and enter the following command to compile your android studio project:
cocos compile -p android --android-studio --ap android-24 --app-abi x86
This will create required files in your proj.android-studio directory.
Now import this project into Android Studio and try to run it.

Resources