VST for Cordova only support API Level 19? - visual-studio-2013

The requirements for the Visual Studio Tools for Apache Cordova specify that SDK for the API Level 19 must be installed. Do that means that apps created with it will only run on android KitKat devices? Any way to target older devices?
Please review the following article for reference:
https://msdn.microsoft.com/en-us/library/dn757054.aspx

Cordova targets a single SDK (currently 19 though a upcoming release will move this to 21). However this is just the SDK used to build - by default Cordova apps can be deployed on devices running API level 10 or higher (2.3.3). Unless you're creating a custom plugin that will use an API only available on Android 5.0, you won't be affected by the SDK used.
The Android tab on the config.xml designer allows you to set alternate values for what goes in "AndroidManifest.xml" file, but the build itself will always use SDK 19.
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Android 4.4.x (API level 19) is required by Visual Studio to build app or create app package targeting Android platform not for running the app. You can create Cordova app targeting device running Android released before KitKat.

Related

Xamarin Android target version

I am receiving the error message below when trying to release a Xamarin Android app on the Play Developer Console
Upload failed
Your app currently targets API level 26 and must target
at least API level 28 to ensure that it is built on the latest APIs
optimised for security and performance. Change your app's target API
level to at least 28. Find out how.
I have the following settings in VS for Mac
Also, all of the Xamarin.Android libraries that I am using are v28.0.0.3.
It must be an issue with your Android support libraries or the version. Can you ensure the below and try to publish it with a new version?
Ensure the latest SDK (API level 28) is installed in your Android SDK Manager
Ensure you have the latest Android Support libraries and Build tools installed.
Set your Android Target version to API level 28 and Minimum Android version to something lesser than that.
Following points you should note:
When Google play talks about target Android version it is talking about the Target Framework in your Android Project Properties.
The error message that you are getting has nothing to do with what version of support libraries that you have. But when you target the latest version you might want to have the support libraries of the same version.
Adding all the SDK's that your Android app is going to support is recommended which means if you Min Android support version is 21 per se and you want to target the latest version then make sure that your Android SDK has all these sdks's so that there are no issues while parsing your APK in the desired version.
I wouldn't recommend that your min Android version is set to version 9 because of the fact 90% of the devices do not have this version of SDK which means none of them will be able to install or use your APP. Which if you ask me should never be the case. Supporting the widest possible audience is always the best call.
After making the above changes your app should work fine. Feel free to get back to me if you have any questions or queries...

why Apply Changes ability only works in devices with API 26 and above in android studio 3.5

android studio 3.5 just released and I installed it, but there is an abnormal thing. and that is the ability "Instant Run" is removed and instead introduced a new thing called "Apply Changes".
the negative point about this ability is that it only works in device with API 26 and above.
is there any way to use this ability for devices with API level below 26?
I faced the same problem. Before upgrade to AS 3.5, I used this function on API 23. But it seems that starting from version 3.5 it is no longer available.
There is a page on the official site: https://developer.android.com/studio/run/index.html
Before 3.5 release:
Apply Changes action is available only when you meet the following
conditions:
Build your app using a debug build variant.
Use Android plugin for Gradle version 2.3.0 or higher.
Set minSdkVersion to 15 or higher in your app's module-level build.gradle > file.
Deploy your app to a target device running Android 5.0 (API level 21) and > higher.
After:
Apply Changes actions are only available when you meet the following
conditions:
You build the APK of your app using a debug build variant.
You deploy your app to a target device or emulator that runs Android 8.0 (API
level 26) or higher.
So if you really need this feature for pre-Oreo, it seems that the only option is to use older versions of the AS. Until more knowledgeable people have not found a hack or some workaround :)

Why am I having trouble with the Android Emulator in VS Comm 2017?

I was having trouble using the Android emulator in Visual Studio Community 2017 and I decided to create a blank project to see if it will run. I get this error message when attempting to run it in the Live Xamarin Player:
Starting Android Emulator Android_Accelerated_x86_Nougat...
Failed to boot Android device emulator-5554...
Unable to deploy to Android_Accelerated_x86_Nougat, please ensure the Xamarin
Live Player app is open and the device is on the same network as Visual Studio.
Why would I have trouble running the emulator in a fresh blank project when I didn't even write a single line of code? Thanks for your help.
UPDATE: So I installed the latest Android SDK 8.0 along with they system image and tried to create a virtual device that uses it. But the Android Virtual Device Manager shows a, 'No system images installed' message when I selected the 8.0 framework. So I installed an earlier version of the SDK along with a system image (5) and was able to create a virtual device with it. So another question is why wouldn't the system images show up for the 8.0 framework?
The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll
(vv8.0) is greater than the $(TargetFrameworkVersion) for your project
(v7.1). You need to increase the $(TargetFrameworkVersion) for your
project
This means the Xamarin.Forms library is targeting Android 8.0 (API level 26) but your project is setup for Android 7.1 (API level 25). You can't change the Xamarin.Forms target version without downgrading, but you can change your project target version easily. You can learn more about these concepts from Xamarin. Be aware some of the details of that Xamarin blog post are already out of date!
There is another nice blog post from Xamarin which can walk you through the process of setting your system up for Android 8.0 API level 26. It's normally not this complicated, but Google changed their SDK tools internally between 25 and 26 in very major ways. They changed from GUI tools to command line tools.
You'll probably also want to get the (in preview) Xamarin Android Device Manager if you don't have a physical device to test with. This Xamarin Android Device Manager tool is the only way to create and configure API 26 and higher emulators without using the Google command line tools.
It seems as though Google has gotten rid of the GUI apps that manage the SDK and Virtual Devices in the latest version, so when you try to create a new virtual device with 8.0 it's not compatible with the GUI tools. Until Xamarin releases a GUI tool to replace them we can use the command-line to manage the SDK and virtual devices.
https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/sdk-cli-tooling-changes
https://developer.android.com/studio/command-line/avdmanager.html

Impossible to create an Android Virtual Device for Android 7.0+ in Visual Studio for Mac?

This is how the Xamarin SDK Manager looked when Visual Studio for Mac was first installed. Only Android 6.0 items were downloaded/installed, and only the items pictured were installed:
By default, an Android Virtual Device called “Android_Accelerated_x86” was preconfigured and available for use when I installed Visual Studio for Mac and updated Xamarin. As far as I can tell, it is an AVD created using the “Google APIs Intel x86 Atom System Image” from the above screenshot, using Android 6.0.
I am able to debug to this Android_Accelerated_86 AVD, with a Xamarin project. It works fine as expected.
I now want to create an AVD using Android 7.1. What I did was in Visual Studio for Mac, I opened the xamarin SDK Manager, and downloaded the following items (checked in the picture):
You can see I downloaded the similarly-named “Google APIs x86 Atom System Image” for Android 7.1, as was preinstalled automatically with Visual Studio for Mac for Android 6.0.
In theory, I would think this should be all I need to be able to create a new virtual device. In visual studioI go to Tools > Google Emulator Manager, and I click "Create..." to try and create a virtual device. For Device, I've tried picking Nexus 10, Nexus 9, Nexus One, 10.1" WXGA Tablet, etc. No matter what Device I pick, if I pick a Target of Android 7.0. 7.1, or 8.0, the CPU/ABI section says "no system images installed for this target". Also, if I pick a target of “Android 6.0 – API Level 23”, it says that “no system images installed for this target”, just like it did for Android 7.0 and higher.
The ONLY way I can create a new virtual device is by picking a Target of “Google APIs (Google Inc.) - API Level 23”, and then it will let me choose “Google APIs Intel Atom (x86)”, and I assume this is because I have the “Google APIs Intel x86 Atom Image” installed from the Android 6.0 section. But I have that corresponding image installed for the Android 7.1 version as well, so why can’t I at the very least pick a target of Android 7.1 and also be given a CPU/ABI choice of “Google APIs Intel x86 Atom image”? I have the same image type as is installed for Android 6.0!
I've tried this on two different machines, with the exact same results. I've also tried downloading appropriate images for Android 7.0 and 8.0, and am still having the same problem - I can't create Android AVDs past Android version 6.0. Has anyone successfully used the SDK Manager and Google Emulator Manager to configure an AVD with Android 7.0 or later? All existing discussions about this type of problem that I can find only show Android 6.0 or earlier. I also tested this with the most recent version of Visual Studio for Mac, and have fully updated all my Xamarin components via the stable auto-update channels.
Visual Studio for Mac (VS4M) uses the Android Emulator Manager within Android SDK Tools version 25. That version from Google does not support later Android Virtual Devices AVD APIs.
If you upgrade your Android tools version to the latest version (currently 27.01), you will receive this message when trying to open the Google Emulator Manager from the VS4M's Tool menu:
As it states, the latest version of the Google Android tools has removed the standalone GUI for creating AVDs.
So you can create them via the cmd-line using avdmanager which is located within your Android SDK (android-sdk-macosx/tools/bin).
❯ ./avdmanager
Usage:
avdmanager [global options] [action] [action options]
Global options:
-s --silent : Silent mode, shows errors only.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-h --help : Help on a specific command.
Valid actions are composed of a verb and an optional direct object:
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- list device : Lists existing devices.
- create avd : Creates a new Android Virtual Device.
- move avd : Moves or renames an Android Virtual Device.
- delete avd : Deletes an Android Virtual Device.
Personally I use the one that replaced it and that is within the Android Studio (Tools / Android / AVD Manager):
To use this one does mean that you need to download the full Android Studio dmg but I already use it for writing/compiling Java libraries for Xamarin.Android binding libraries, access to Android Instant Apps tools, etc... Also its Android SDK Platform and Tools manager is "better" than Xamarin's (IMHO/Its a personal preference thing...).

Android Studio for Project Tango

I have downloaded latest Android Studio 2.2.3 and I want to start with C examples for project Tango phone (Lenovo Phab 2 Pro) using C API. The phone itself says it's run Android 6.0.1, kernel 3.10.84 on device.
Google developer documentation for Tango Project suggest to install Android Studio with Android SDK 24.4.1, Platform tools 23.1 and NDK 11.0.0.
By installing latest Android Studio there is no offering to install those versions of tools. Is it possible to use whatever SDK for development (latest)?
Where do I find aforementioned versions?
What Android SDK & NDK version is required for phone which run Android 6.0.1?
I started using the Dev Kit which runs Android 4.4 KitKat and I just recently got the Phab 2 Pro this week and I didn't need to make any updates to my Android Studio SDK manager.
Since I am working only with the Tango and not with the underlying Android features, I have found no need to require 6.0 for I am not using any of the extra features.
Also go here and clone the repo and run the hello-world and see if you can get it to work on your phone, if so you are good to go!
the SDK Manager which is part of Android Studio offers you choices on levels of android builds like 4.4.2/5.1/6.0/6.1, etc. Platform tools package is a module within the SDK Manager which also has levels which are based on the android build. The NDK is a completely different package and depending on what you want to accomplish you might be able to not worry about it to start of with. install Android Studio and then setup the SDK Manager to cover what devices you want to build for. get the latest Platform tools package setup and you will be ready to code. once you start setting up your environment things will fall in place. for the most part the installer does the work. pay attention to the things needed prior to installing Android Studio. i think you need to install a jdk and set paths and variables.

Resources