This has been consistent across a lot of the glass code i've worked on. Why does the target API prefer the former instead of the latter?
Most of the projects I load into eclipse, I have to change the make target for my code to compile. This is the same for Google APIs:15 and GDK15
#target=Google Inc.:Google APIs:19
target=Google Inc.:Glass Development Kit Preview:19
using android development tools eclipse.
When you create an Android project, the Android Development Tools (ADT, based on Eclispse) default to the latest Android API level. Google Glass (and the sneak preview) are special conditions for Android (much like "Wear" is too).
To create a project that runs on Google Glass you need to use the "preview" Glass Development Kit as the target ... because there are hardware differences and a small set of features that are specific to Glass and require that implementation.
When you create an Android project, you have to create the appropriate target environment when you establish the project. For Google Glass, the original release required API level 15 (and the appropriate preview version). With XE16, the level became API level 19 (for compilation), and the newly released Glass Development Kit Preview that was moved up to support the latest Android API level.
Related
The new version of SDK for Qt 5.12 doesn't include SDK Manager in the Tool folder, hence I needed Android Studio to Add/Remove the packages.
I know that APIs must be chosen based on the target and purposes. But since the APIs are new (28) and there are different options to download, it's rather puzzling what to download.
I don't have a real Android device nor want I use the Emulator. I merely wish to Build the program using Android kits and create APK files from them. Afterwards I will test those APK files on real Android devices which include new or middle aged smartphones and tablets.
For these purposes what packages should I install, for instance, what check boxes are needed to be checked here in the screenshot below. I will repeat the pattern for a number of lower APIs then.
If you don't want an emulator, then you don't want the "system images".
As for the API level, it really depends on what is the minimum API you want to target. If you download only the latest API, you significantly limit your targets, as the app will only run on the latest and greatest version of Android.
The safe lower limit seems to be API level 19, which is android 4.4. So you can use that to build your apps, and they will run on any version onward.
Additionally, if you want to publish to the market, you will have to set your target API to some of the latest versions, because google won't accept any older. Note that the "target SDK" is different from the "minimum required SDK", which you can still have at version 19.
There isn't much point in installing the latest SDK versions, as Qt isn't really using their features, I mean unless you are doing some Java native android app development.
The documentation for Qt 5.12 says "API 21", but 19 seems to work just fine, and it allows to target older devices that are stuck without OS updates - currently around 7-8% of active devices. Still, if you don't care about that, you should go with the recommended API version 21.
I'm currently working in a project involving adding microtransaction inside our android mobile game. We are using Unity and their easy to implement service system (Unity IAP). Our project need to run with the Android SDK 23 in order to compile with the plugins we're using.
Now since we added the In-App Purchasing service, Unity need to use the Android SDK 24 to build an APK. It's actually showing me an error that it can't merge the AndroidManifest because of this contradiction. One place we need API 23 and another API 24.
Is there a solution ? Is there a way to download or import a Unity IAP compatible with Android SDK 23 ? If so where and how ?
I can't seem to find anything about this.
Thanks for you help
Merely install Android SDK 24 on the build machine and retry with prior settings to fix. Minimum SDK (android:minSdkVersion) for Unity IAP has not changed with v1.11.0, only targetSdkVersion.
The AndroidManifest.xml for GooglePlay now includes a VR extension to help support Daydream purchasing. Buying goods on Daydream, without this extension, will cause uncomfortable flickering for a user. Android SDK 24 includes this new resource definition, and the corresponding dependency hint <uses-sdk android:targetSdkVersion="24"/>, to support a smooth, immersive VR purchasing dialog.
See What is the difference between min SDK version/target SDK version vs. compile SDK version? for more on Target SDK.
See https://forum.unity3d.com/threads/cant-use-iap-on-version-5-5.472094/#post-3079524 for a picture illustrating a shortcut to installing SDK 24, from Unity 5.6 or Unity 2017.1.
I installed Android SDK 24 and change my player settings so the Target API is 24, kept minimal API to the lowest possible. Everything's working fine now the game is building an APK.
Thank you all.
I know there are plenty of documents over the internet but I have still some doubts about what SDK to install on my computer to create an android application for nearly %100 devices to working with. Google Play says that if I use API 8 (which is Android 2.2) then my application work nearly all Android devices.
So I downloaded API 8 and API 22 (Android 5.1, was default installed by Android Studio itself) and I don't know if it works or not if I select Minimum SDK to API 8 while creating a new project.
So seriously guys, what the heck is going on?
What SDK Platform(s) you install has little to no impact on what versions of Android you can support.
If you create a new Android Studio project via the new-project wizard, you will find an app/build.gradle file. In there, you will find a setting named compileSdkVersion. This controls what version of the Android SDK you are compiling against (i.e., what JAR is used to satisfy compile-time references to Java classes like Activity and TextView). Whatever value you specify for compileSdkVersion must be an "SDK Platform" that you have installed from the SDK Manager.
In a newly-created project given your setup description from your question, you will see that compileSdkVersion is 22, lining up with pre-established API Level 22 edition of the SDK Platform.
However, this does not mean that your app will only run on API Level 22+ devices. Much of what is in the API Level 22 edition of the Android SDK has existed in previous versions of the SDK.
The minSdkVersion property in the same app/build.gradle file says how old you are willing to go -- what is the lowest API level you are willing to support. Right now, I think a new project will be set up with minSdkVersion of 15, though that varies over time. More importantly, you can change it to be whatever you want, and you do not need the SDK Platform installed for whatever level you choose.
If, in your code, you reference stuff in the Android SDK that is valid for your compileSdkVersion but is newer than the minSdkVersion, the build tools will point out the discrepancy, so you can make sure that you know what you are doing. This is how Android handles progressive enhancement -- you see what version of Android you are running on (Build.VERSION.SDK_INT) and use newer APIs where you can, falling back to older APIs as needed.
TL;DR: So long as your compileSdkVersion has a value for which you have an installed SDK Platform, you're set.
It depends on the application you are developing. And the resources that it will need. It's true that if you use the oldest version (API 8) and your application is simple enough, then it will work on any device.
But there are limitations to it. on older APIs you will not be able to use new features as Navigation drawer for example
I would recommend API 11 or 14, that covers most of the devices and features nowadays.
You should consider the design you want to create on your app
You can see the market share of the different api versions here: https://developer.android.com/about/dashboards/index.html
Then you have a trade-off of how advanced APIs you want to use vs. how many devices you want to support.
When creating a new android project, the build target has two choices:
Android 2.2, Android Open Source Project
AND
Google API's, Google Inc.
Both show Platform as 2.2 and API level 8
Which to choose (and why)?
The AVD with Google API's contains google Api's like GoogleMaps.
For example:
If you application uses GoogleMaps, then you will have to use an AVD with Google API's.
I'm interested in learning Android development.... but if I install the latest 2.0 SDK, will I still be able to target 1.5 and 1.6 devices? (since there is only one 2.0 device right now)
Basically I'm wondering if it will tell me if I'm doing something that won't work on older versions of the OS
Yes you will be able to pick level that you need using combination of Manifest setting and (when in Eclipse) picking Android API version that you need. With 2.0 install you may not get 1.0 or 1.1 but legacy distros available from Google and you can always set your environment to use that
And if you accidentally set your environment to something that device that not support you should always test on the device and watch for exceptions such as ClassNotFoundException and NoSuchMethodException which would indicate that you are attempting to use classes/methods that are not present in the API loaded by your device
You should always target the minimum API that you require as noted on the Android Development site Hello World tutorial
"If an application requires an API
Level that is higher than the level
supported by the device, then the
application will not be installed."
"Android applications are
forward-compatible, so an application
built against the 1.1 platform library
will run normally on the 1.5 platform.
The reverse is not true."