I have made an app for android and have kept the minimum sdk version as 7. But to integrate admob, the minimum sdk version required is 13. I read in one of the questions that to fix this, we can change the target in project.properties to 13 i.e. target=android-13 but this gives a warning Attribute minSdkVersion (7) is lower than the project target API level (13). Could this warning be a reason for the app to be rejected?
No, The warning is not a reason to have the app rejected. It is simply a warning that your app may not work on earlier versions of android because of the higher build target.
I have an app with exactly those settings and that warning in the Android Market. And as far as I know (and see from the amount of 5 star ratings) it doesn't cause any problems.
Related
I have developed an application for Android in Kotlin. I was assuming that Android studio is taking care of the compatibility of the used libraries and the code once I setup the minimum targetted Android version.
I am getting responses that the app is crashing with noSuchMethodError, which is linked to a listview's .getView() methode.
I am running the app on Android 8, but these errors are reported on Android 6 and 7 randomly.
I was reading different articles about this failure and I am having the feeling that i might need to setup the libraries setting differently in Studio.
In your build.gradle you can specify a minSdk and a targetSdk, while the targetSdk specifies as the name says the target audience and is in general the newest version e.G. 29, your minSdk takes care of your minimum supported version.
So if you have minSDK 19, Android Studio will show Warnings in your code whenever a method or class is not compatible with devices running sdk 19.
Anyway this might not solve your "noSuchMethodError".
I am getting this Error when I try to publish this app in the store to an update of existing app. I am using Visual studio Apache Cordova Tools to build the apk and the previous version was published with Intel XDK
It is forbidden that a device upgrading from API levels in range 16-23 to API levels in range 24+ should downgrade from version 48 to version 9, which would occur when
Screen layouts containing any of [small, normal, large, xlarge] and
Features containing all of [android.hardware.screen.PORTRAIT, android.hardware.TOUCHSCREEN].
Please let me know why I am getting this issue. Also possible solutions for this.
Thanks a lot
This is not due to the tool you used for build. I faced the same issue. Here is what I was trying to do.
I had my version 5 covering minSDK as 8 to maxSDK as 23.
I released a version 6 from 14 to 23. In this build I found that app was crashing for version from 14 to 20 but working fine above 21+
So I wanted to create a version 7 covering from 21+ and also enable version 5 in play store console so that rest of the devices running 14 to 20 also can be covered by version 5.
But since we have already published a version which has given coverage for devices running api 14 to 23, we are asking Google to downgrade those devices.
And that is why you see
"It is forbidden that a device upgrading from API levels in range 16-23 to API levels in range 24+ should downgrade from version 48 to version 9, which would occur when "
Please ensure you are not downgrading the devices running those api which you had given an updated version already. Check your build.gradle file or Manifest to confirm the same.
In my case, I solved this by fixing the issues causing the crash and released version 7 that works fine from API 14 to 23. Hope this helps.
Finally I fixed but what I did to fix is uncertain
I tried to update Visual Studio 2015 Tools for Apache Cordova (update 7) and also updated cordova to 5.4.1 and a rebuild fixed the issue in store.
so I am not sure what was the cause and what fixed it. but definitely just serveral rebuilds didnt fix though.
Hope this will help someone in future
Say I wanna make an app with :
android:minSdkVersion="8"
android:targetSdkVersion="22"
My questions :
Do I need to install both "min SDK Version" as well as the target SDK version?
How if I only have SDK Version of 23 only? Can I make such setting? Or do I need to have both 22 as well as 8?
Can I debug such app with API / SDK Ver 21 phone?
Is it enough to only have the latest SDK version to develop any kind of app?
It is okay if there's any source (link) to comprehensive rule about such ruling, since I didn't found it even after extensive searching.
P.S. I don't know if this info is needed, but the app I wanna make is a libgdx game app.
Thanks
No. (the other answer is wrong)
You only need to have the version that you building with (compileSdkVersion in build.gradle). If you only have 23, then build with 23.
Usually, you should target the same version you build with. However, libgdx is not always fully tested with the latest Android. Check here under Android build version to see what it has been tested for. This is the SDK level you should should target if you want to be sure not to have any problems. Right now, it is version 20 of Android.
I have been targeting Android 22 without issue (that I know of), though. I haven't yet released something higher than 20 yet so no guarantees that it's perfectly safe.
Yes.
Yes. Generally, the target SDK version and the build SDK version should match, but it works if you target a lower version than you're building with.
Targeting a later API basically changes some default behavior of apps. Theoretically, you should be testing on devices spanning the full range of API levels that you support, but in practice this is unnecessary for a libgdx game. But if you target a version that's too old, you might miss out on some newer features. For example, if you target <19, immersive mode (which is desirable for most games) cannot be supported.
Yes you need to install
If you have SDK Version of 23 only but you want to build it in version 22 then also you need to install vesrsion 22 SDK.
Yes you can easily debug such app with API / SDK Ver 21 phone.
I think its enough.
I created an app compatible with API level 14+. I want to now make it compatible with API level 10+. I know for a fact I am using API calls introduced in 14, so I was planning on lowering the minSdkVersion first, and then fix the errors that it caused.
The only problem is, when I lowered the minSdkVersion in the manifest, no errors are thrown. It used to throw errors when I did this, but now it isn't for some reason.
Is there a way to force Eclipse to check my API calls and make sure they are compatible with the current minSdkVersion?
Thank you.
Right-click over the project in Package Explorer, and choose Android Tools > Run Lint.
If you change the minSdkVersion it won't change what sdk the app in compiled against, only the api levels that the application can be installed on.
If you want to compile against a lower sdk change the targetSdkVersion.
Links: Difference between "Build Target SDK" in Eclipse and android:targetSdkVersion in AndroidManifest.xml?
and http://developer.android.com/guide/topics/manifest/uses-sdk-element.html also Android Min SDK Version vs. Target SDK Version
I'm working on an application which uses ActionBarSherlock. As it's documentation points out:
[...] the library requires that both it and your project are
compiled with Android 4.0 or newer. The project also requires that
you are compiling with JDK 1.6 in both your editor and any build
systems that you may be using.
So, that means I'll compile my application (and the library) against Android 4.X but in my Manifest, I declare that I'm targeting (e.g.) API Level 9.
This all works fine and well but there is something that disturbs me. From the FAQ:
What API level should I target in my manifest when using the library?
Targetting API level 11 or newer is required as it will cause Android
to automatically add the native action bar when run on newer devices.
Since you will be compiling against new APIs but your app will likely
be run on devices with older versions of Android extra care must be
taken to either avoid using or properly check and call any methods
that were introduced after your minimum SDK version.
That means, that I'll have to manually check every method call, so I don't use any that are not available in my targeted API Level (9 in my case)? This sounds wrong to me.
Is there a way to tell my IDE (IntelliJ), that I'm only using the API Level 9 (so I don't get any auto-completion for non-existing methods/classes and don't use them by accident) and then choose to compile it against another Android version?
Or can I use some automated checks (which run at compile time) to check for that?
The ADT's lint feature should take care of this by warning when API calls are being made for the wrong API version.
You should be compiling both ABS and your project with the latest SDK available (at present, 4.1). Your manifest should have a targetSdkVersion as high as possible (ideally matching your compilation SDK) and your minSdkVersion should be set to the lowest version you support.
Lint is partially integrated with IntelliJ IDEA and is also available as a command line tool.
You temporarily set your target SDK to the various lower ones and debug with it. Your final build then is with the latest SDK.
Set a Build target similar to that you have mentioned in your manifest.
as always , you should set the targetSdk to the maximum available on both the manifest and the project.properties file (as recommended by google on one of their videos) , so that the ADT&SDK would be able to optimize the ADK accordingly.
set the minSdk to the one that you wish to support your app from , and let Lint to tell you if there are any problems in case you use too-new-features.