Android Studio Rendering Problems with an Android version lower than 6 - android

I start New Android project "Blank Activity" in Android Studio with Android 4.0
but I noticed that for rendering used API 23 (Android 6.0)
and if I click to use Android 4.0 (4.4W.2, 4.4.2, 4.3.1, 4.2.2, 4.0.3), i receive the following error:
Rendering Problems
The graphics preview in the layout editor may not be accurate:
- PorterDuff Color Filter are not supported. (Igrone for this session)
Tell me please how to fix this problem and why it happens.
Or it is quite normal that for rendering the project that uses the Android 4.0 uses Android 6.0 ?
I use Android Studio 1.5.1 141.2456560 and Java SE Development Kit 1.7.0_79

I think I found the answer to this question
https://www.youtube.com/watch?v=Sxo5zMcOCXM
The application for a specific API will have forward compatibility with future releases. Platform SDK uses the target value if the near future platforms will be expected a significant change in behavior. This ensures that the application will not break when you upgrade a user's phone.
It turns out that it does not matter as what API to use for rendering the project. If you created your project for the minimum Android 4.0 platform and rendering in Android Studio using Android 6.0 then it is quite normal.

Related

New Android App ( Xamarin) targeting Android 9.0 api not compiling because missing Android X assemblies (but they need Android 11.0 version)

I am trying to build an Android app to make a simple prototype. Using Microsoft Visual Studio 2022 (v17.2.4), I create an Android App (Xamarin), blank app. And I target Android 9.0 version.
But, I have compilation errors :
Could not find 2 Android X assemblies, make sure to install the following NuGet packages:
Xamarin.AndroidX.Lifecycle.LiveData
Xamarin.AndroidX.Browser
Problem is that I can't install these NuGet packages because they need Android 12.0 version or greater :
Package Xamarin.AndroidX.Lifecycle.LiveData 2.5.1 is not compatible with monoandroid90 (MonoAndroid,Version=v9.0). Package Xamarin.AndroidX.Lifecycle.LiveData 2.5.1 supports:
monoandroid12.0 (MonoAndroid,Version=v12.0)
net6.0-android31.0 (.NETCoreApp,Version=v6.0)
So I don't know how to solve this. I don't want to target Android 12 version, I need this app to launch on an Android 9.0 device.
What are these libraries the app need to compile? Can I do without them? I don't find any references to them.
Note : I have a warning too on the same way, but not sure if it has to deal with my compilation issue. I Put it anyway, if it can help :
Warning Google Play requires that new applications and updates must use a TargetFrameworkVersion of v11.0 (API level 30) or above. You are currently targeting v9.0 (API level 28).
Please, any idea to solve my issue?
I just want to compile and launch an Android (Xamarin) blank app targeting Android 9.0.
Thank you and have a good day,
I'm finding this a problem too. Just deployed an app (Dec 2022) that targeted 28 / 12 and has min version 10 as appears enforced by Google?
Prob is I've got a lot of people wanting to use the app that can't see it because they have ancient phones (9 or earlier - is that 5 years or more). Seems a bit tough? Is there a way to overcome this.
I assume that the today's Xamarin Android project templates are designed to compile with Android 12. I don't think there is a way to build them with Android 9.
I guess we just have to find another older template?
For my part I had finally took an older project I had instead of creating a new project.

Cannot use new version of android to compile my app

I am using Visual Studio with Xamarin, as shown in the picture, the latest available android version for me is JellyBean, this is preventing me from using quite some new features. I have set the target version to 6.0 and minimum required version to 4.0.3. Current Configuration in Visual Studio
Does anyone has experience how to solve this issue?
Many thanks!
Greeting,
Kyle
the screenshot at version selection
This happens because of the current referenced Mono.Android.dll in your project. You are most likely setting your <TargetFrameworkVersion> to only Jellybean here. That or the highest level of Android you have installed is Jellybean and it's using the latest platform available via the following in your .csproj:
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
EX:
If you set your <TargetFrameworkVersion> in your .csproj to Jellybean:
<TargetFrameworkVersion>v4.3</TargetFrameworkVersion>
Or via the GUI in Properties -> Application -> Compile using Android version:
Android 4.3 (Jelly Bean)
You would then only have a reference to the 4.3 version of Mono.Android.dll which only includes Android.OS.BuildVersionCodes enums up to Jellybean.
Thus if you had changed your <TargetFrameworkVersion> to v6.0 you would have access to all the current Android.OS.BuildVersionCodes enums up to Marshmallow. You may need to ensure that you have these API levels installed in your Android SDK, and that the respective <TargetFrameworkVersion> is the correct version of the respective API version you'd like to use in the enum.

unity + vuforia require sdk android 5

I am using unity 5.1.1 and vuforia v5.0.5 , documents say it works with android 4.0.3, but while building it asks for android platform 5 minimum (API 21)
Is there a way to limit it to jelly beans?
The project I am trying to build is a new vuforia project , I havn't changed a thing
I defined the project to support android 4.2, though it asks for API 21 even when configured to minimum support gingerbread

sdk target for barcode scanner library and main cordova android app project

I am working on a Cordova Android project with barcode scanning ability. I find the detailed steps on this blog helpful: http://simonmacdonald.blogspot.ca/2011/12/installing-barcode-plugin-for-phonegap.html
However, I am a bit concerned about the mismatch of SDK target of barcodeScanner library (Android 4.0) and that of main project being 2.x. As 2.x is still dominant Android OS in the market, it makes sense to build main project targeting 2.x.
Will that barcodeScanner library targeting 4.0 work well on 2.x handset?
Am I missing something here?
Any pitfalls to watch out for? especially considering future code changes to adapt to fast changing Android handsets.
Don't worry about it. You always want to build your app against the latest version of the Android SDK. The SDK can handle the backwards compatibility aspects. If you want to target from Android 2.1 and higher set the minimum SDK to 7 in your AndroidManifest.xml.

Which SDK is used for Android 3.3?

Which SDK do I use if I'm developing for a device running on Android 3.3? The closest, version number-wise, is 3.2.
You use 3.2. The Android SDK only has a new version if it includes "new" features from the last version. Therefore, you just round down to the nearest SDK. 4.0.4 uses 4.0.3, 2.3.7 uses 2.3.3, and 3.3 would use 3.2.
Note, however, there is no publication of Android 3.3. Take a look at the API levels documentation for a list of the valid versions. (Thanks to #uDaY for the link + info.)
It doesn't exist... that is, there is no Android 3.3.

Categories

Resources