I installed Appcelerator on Windows, am trying to see android output.
I managed to add an android device by downloading - launching an android emulator called Genymotion. Now I have an IP address added to the Run menu, when I activate it Appcelerator tries to launch: console messages appear. But after 1minute or so I get a message saying I should download an SDK API level 23.
I had an old version of Android Studio, I updated it, opened its SDK manager tool and downloaded everything I could find, rebooted, but error persists. I can see Android version 23 in the list.
Here is the error message:
[ERROR] : No valid Android SDK targets found.
[ERROR] : Please download an Android SDK target API level 23 or newer from the Android SDK Manager and try again
I had the same issue recently and it turned out to be the java JDK missing from my path.
Take a close look at the Appcelerator environment variable documentation for windows.
Below are some java directories included in my path on my new Windows 10 machine:
C:\ProgramData\Oracle\Java\java;
C:\android-sdk-win\tools;
C:\android-sdk-win\platform-tools;
C:\Program Files (x86)\Java\jdk1.8.0_65\bin;
Also, I really suggest using GenyMotion (which I avoided for years) to run your emulators, turns out to be incredibly fast, easy to setup and they have free Basic Version.
Best of luck.
Now I have an IP address added to the Run menu
Studio should detect Android & Genymotion emulators and allow you to select from a list. No need to enter the IP. If you don't see the emulators, run appc ti info -t android to see if there's any issues that need fixing.
Related
I am attempting to play around a little with xamarin within Visual Studio 2019. I built a new Xamarin Android application and just want to run the base code in the emulator, but I am getting the error in the image below. When I installed VS2019, I did so with the xamarin features including the SDK on my secondary drive and I can see the sdk file on my secondary drive, but am fairly sure that VS2019 is looking with my primary drive for some reason. Is there a way to fix this?
I don't bother with the SDK or emulator packages through the visual studio installer anymore. Install Android Studio, use the tools in that to download the SDK and setup the devices you want to emulate. Then back in Visual Studio, set the paths in the Xamarin/Android Settings in the options menu. Mine look something like this:
Android SDK Location: C:\Users\myusername\AppData\Local\Android\Sdk
Android NDK Location: C:\Users\myusername\AppData\Local\Android\Sdk\ndk-bundle
This setup seems to have much support for Android and gives you the various Google apps and services in the emulators.
Fist, you should check your android sdk path by Tools > Options > Xamarin > Android Settings to view and set the Android SDK location:
For more details, you can check here.
Meanwhile, you should check the Android SDKs and Tools by steps: Tools-> Android->
Android SDK Manager...,then you need install the platforms and Tools you need.E.g.
It seems a little bit late, but I faced this issue and I did the following to sort it out:
Be sure that the BIOS virtualization is enabled
Run the VS2019 as an administrator and run the Android device manager
Wait a for seconds it takes some times
After getting the screen of the Android device manager press the (+) plus button
If you get the menu titled New Device then cancel the creation of a new device
close VS2019 and log out the administrator account
Log in again with your account and run the Android device manager
Hope this may help
I made a simple hello world app which I would like to deploy to an emulator in Android Studio.
This used to work before for exactly the same project (I installed all necessary packages) but this time for some random reason, in the run options when I select "Target: Emulator", under the "prefer Android virtual device" I get the following in red: "Unknown AVD".
I've googled around and the answers vary. The answer that seems to make the most sense is:
You have to install all Intel Image Library and Google API for your
desired API. Go to your SDK Manager and check intel system images is
installed or not if not then you have to installed it as well install
Google API Library.
However I don't have these "Intel Image libraries" and "Google API" options in SDK manager. Are these shorthand aliases for other names in the options?
Any ideas on how to get the emulator up and running?
A bit of information on my environment:
Android Studio 2.3.3
Windows 7 Professional 64 Bit
Gradle Version: 3.3
Selected SDK Platform Package: Android 7.1.1 (Nougat)/ API Level 25
Revision 3
Virtual Device: Nexus 5X API 25
Try to kill the adb server and restart it.
Locate your adb binary (linux/osx) or adb.exe (windows) and do:
adb kill-server
adb start-server
this should fix your problem
Even if your problem still not solved then Restart emulator.
Locate the adb.exe by going to where your sdk is installed and go into platform-tools. Mine is the default and also the most common (C:/User/$USER$/AppData/Local/Android/sdk/platform-tools/)
After that kill the server and start the server back up. That might fix it, if not drop a comment and let someone know that the problem isn't yet resolved someone may be able to help.
this problem may be related to the version of the gradle file of your application. Try this:
goto Android -> Gradle Scripts -> Build Gradle(Module :app)
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 got a new laptop this week (Win10), installed Visual Studio 2015 community, followed by Xamarin. I've created a blank Android project, uncommented the SetContentView(...) line in MainActivity.cs, then build the solution. However I'm running into various problems when I try to run it:
The list of emulators (next to the green "run" button) only contains two entries: "Android_accelarated_x86 (Android 6.0 - API 23)" and "Android_ARMv7a (Android 6.0 - API 23)". Is this normal? The Xamarin doc'n seems to suggest that a number of "Xamarin xxx" emulators would be installed.
When I run the project against "Android_accelarated_x86", the emulator starts up, Visual Studio reports the deployment is successful, but Visual Studio stops debugging. In the output window I see this:
InspectorDebugSession(0): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(0): Constructed
Android application is debugging.
Couldn't connect to logcat, GetProcessId returned: 0
InspectorDebugSession(0): HandleTargetEvent: TargetExited
InspectorDebugSession(0): Disposed
If I hit run again, the app seems to start on the emulator, but then a message appears saying "Unfortunately xxx has stopped" (where xxx is my project name). The above messages appear in the VS windows again (apart from the one about 'Couldn't connect to logcat...').
I've also noticed that the "Manage Virtual Devices" item in the dropdown is greyed out, so I presumably can't try creating a different emulator?
Shooting from the hip on this one but do you have the Android SDK installed? It should install a number of other emulators and give you access to the device manager.
There are emulators you can INstal with Visual Studio. Emulators that come with the Android SDK and emulators that install with Xamarin Studio.
One additional thing to try would be to install Xamarin Studios. It does a slightly better job in my experience of setting up your environment then VS Does.
Firstly, the Manage Virtual Devices is referring to Xamarin Android Player VMs (which is now deprecated). We're working on getting this removed if Xamarin Android Player isn't present.
To create / edit / fix your Google AVD VMs you should select Android Emulator Manager. Regarding the number of devices listed, I'd probably ensure everything Xamarin is updated..
Visual Studio > Tools > Options > Xamarin > Other > Check for Updates
..and also update all your SDK components. If you have an Intel CPU you should use the x86 images for best performance. If you haven't already installed this you can get it here:
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
If you update any images it could be that your AVD needs repairing, which you can do in the Android Emulator Manager by selecting the relevant image and clicking Repair.
Also, you will only be able to deploy to devices that your project is targeting, so it's worthwhile checking the AndroidManifest.xml or by right-clicking your project and checking the 'minimum' and 'target' Android API levels to ensure you're encompassing the AVDs you have created.
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