I'm a newbie in Android Studio. I created a 'Hello World' project then ran it in an emulator. But the Emulator always gave me an error-
My installed SDKs are-
I cannot do anything on the emulator. Please help me. Thanks a lot.
You need to have platform tools to develop anything for android. Also if you're testing on an emulator you need to have the system images for that particular API against which you are developing, ie, your target API. You haven't yet installed all the packages you should to start developing. You can visit https://developer.android.com/tools/help/sdk-manager.html for more information about the required packages.
To download packages, open Android Studio, go to Configure and the SDK Manager.
Related
So recently I installed Android Studio for work at college, but can't make the emulator work and I don't know how?. I installed everything it needs HAXM and etc and the process is always getting killed, tried to look at the Command-Line and no errors are found.
Any Tip?
Command Line
Devices
Run Android Studio
SDK
You should first check if your system meets the requirements: https://developer.android.com/studio/run/emulator#requirements
Then simply follow the official tutorial in the Android Dev Docs: https://developer.android.com/studio/run/emulator#install
If then still errors appear you should take a look at the logcat in Android Studio.
I just recently installed Android Studio (Version 2.3) so I could use the SDK / AVD GUI manager built in now that the standalone is deprecated. I'm on Windows 10 and this is a fresh install. My goal is to be able to setup a virtual device as well as setup my own android device to run a NativeScript app. After install the SDK button is available, but the AVD button is disabled (below).
I have the Android 7.1.1 (Nougat) SDK Platform installed and the Intel x86 Emulator Acc. installed (below). This is all default installs so far.
I've tried installing / reinstalling as admin as well as opening as admin per this post to no avail.
The Android SDK home path, build target, and Java SDK are setup in the project structure by default correctly as well.
Any thoughts on what I'm missing here?
As a side note the android help page for creating AVD's lists a menu option (tools -> android ) which doesn't exist.
My issue was Android Studio does not understand where to load the nativescript android project even after adding android as a platform (If someone knows a way around this, feel free to post). In my particular case I'm testing the angular-seed-advanced. To at least get the command line working (AVD manager is still greyed out):
Create a new blank android "test" project in android studio
The AVD Manager becomes available
Setup an virtual devices as necessary
Reopen nativescript project
use command npm run start.android
prepare, build, run and livesync will work as expected now.
Hope this helps someone else get started.
I have a quite big problem as accidentally removed the file, it is already removed from the bin on Mac. Now in Android Studio I cannot run emulator and I get the below message:
Can anyone help me please? What should I do now? Is there any way I can reinstall this missing file for Android studio?
Many thanks in advance!
EDIT: My problem was a missing .exe file: qemu-system-i386. I couldn't find any working solution, tried installing various images versions, was creating new emulators. I decided to uninstall Android Studio and proceed with the new installation. I used a free tool, AppCleaner, to remove the Android Studio, you can read more about this here: http://lifehacker.com/5828738/the-best-app-uninstaller-for-mac. But still had to remove manually the entire sdk tools directory. You can actually do the same from the terminal, here is the thread how to do it: How to completely uninstall Android Studio?
Anyway, the important thing it is working now! :D
1) Open the SDK manager (see the image below):
[
2) Launch the stand alone SDK manager
3) Ensure that you have downloaded and installed the SDKs and tools for Android version that you'd like to emulate. In my case I use API 25. You should also have the Intel x86 Intel Atom System images installed.
4) Then open the AVD Manager and "Create a Virtual Device"
5) Select the API level that corresponds to the one you installed in the previous steps. In the newer versions of Android Studio you can also download and install the System Image you desire in this menu.
I have created a Helloworld cross platform project from Visual Studio .
The project builded successfully and while running the android project using the emulator (Nexus4 KitKat Android 4.4 ) I am getting this warning
Xamarin Android player Beta has expired ,Please update
And once I press OK I am getting message
There were deployment errors . Do you want to continue?
How can I fix this issue? Did I missed any components during the installation of xamarin for visual studio?
Xamarin Android player is cancelled officially , so my recommendations for you are three Emulators.
Visual Studio Emulator for Android: For me this is the best emulator available. However it requires that Hyper-V feature to be enabled.
Genymotion: I see this as a better alternative for Xamarin Android Player. However it needs a license.
Android Emulator which is provided by Android SDK. By default it is a slow emulator however there is a tweek you can do to make it faster:
Go and download HAXM from here
Go to your android sdk manager from your visual studio
Go down to Extras and install Intel x86 Emulator Accelerator
By doing this , now you can use the emulators which comes with Android SDK and they are great.
I did a fresh install of Xamarin Studio on Windows 7. Tried to run the simple Hello world Tasky app....
"Could not find android.jar for API Level 10."
Alarm bells! Here we go again...so in the Android SDK Manager I can see that API 10 SDK was indeed not installed so I tried to install from Manager but came up with the following error:-
Downloading SDK Platform Android 2.3.3, API 10, revision 2
URL not found: C:\PROGRA~2\Android\ANDROI~1\temp\android-2.3.3_r02-linux.zip (Access is denied)
Done. Nothing was installed.
MOre alarm bells...So, I had to physically give my self write access to the folder in Windows and then also the platforms folder in the android sdk folder...hard work!
So now the solution builds, but still won't run! ... the default Galaxy Nexus emulator starts but then doesn't run Tasky..... Its enough to drive you nuts man.
There seems to be a lack of robustness like checking which android API is targeted for the project against an appropriate emulator version? Thats without even mentioning the Windows file permissions!.
What do I need to do get Xamarin Studio to run the simple Tasky demo app?
This happens when you don't run the SDK Manager with elevated permissions.
Run the SDK Manager as Administrator
I ran the API 15 Emulator and it spun up the demo app, but Xamarin Studio has crashed out a few times on Windows so probably best to use Visual Studio as you will get better Intellisense, code completion etc