I am using my app on api level 22. I need to change the api level to use the in app purchase functionality. When I change the target version from 20 to 21 then clean the project, I found that there are many error messages. the reason is on the clean the gen folder not creating the required files.
While when I change the target version from 21 to 20 it is working fine.
Related
I have just upgraded the gradle plugin in my app to version 3.2.
I'm now getting a lint error stating that FloatProperty, which was already being used in my app, cannot be used. The minimum API level in my gradle file is 21. The error is:
Class requires API level 24 (current min is 21)
My question is why does this build and run fine even on my test phone running API 22?
your compileSdkVersion which is 28 on its own has nothing to do with what devices can and cannot run your app. Usually, you set this to be the latest version of the Android SDK.
Frequently, the development tools will warn you on the fly when you try using something that is newer than your minSdkVersion. You can run a full Lint check to reconfirm periodically.
targetSdkVersion helps with backwards compatibility, and usually my description is "it's the version of Android that you were thinking of at the time you were writing the code".
I built an android app with Nativescript framework, I tried to upload my SDK to play store and am getting this error below
"Your app currently targets API level 25 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 26."
I have change the API LEVEL in AndroidManifest.xml but that doesn't seems to work, how can I fix this issue.
After changing the targetSdkVersion in AndroidManifest.xml make a clean rebuild to amek sure that the changes are applied in the Android project.
If the above is not working you could explicitly set the targetSdkVersion in your project's app.gradle file as done here
I imported the Mapbox SDK (1.4.2) to my Unity project and wanted to build the project for Android. I want the app to run on the lowest Android version supported by Mapbox. According to the Mapbox website, the minimum API version is API 14 (Android 4.0.0). But when I try to build the project, it tells me that the library needs minimum API 24 (Android 7.0.0). However, I have set the project to have the minimum API 16 (Android 4.1) and the target API the highest installed (Android 8.1), so the project runs on every Android version in this range.
But when I try to build the project as .apk an error occurs indicating that the manifest merger failed.
Image showing the error which occurs in Unity
The two Android manifest .xml files are as followed:
/Users/user/Desktop/Project/Temp/StagingArea/android-libraries/com.mapbox.android.unity-debug/AndroidManifest.xml
(Image) Link to the content of the AndroidManifest.xml file
/Users/user/Desktop/Project/Temp/StagingArea/AndroidManifest-main.xml
(Image) Link to the content of the AndroidManifest-main.xml file
I don't know what to do. In the AndroidManifest.xml file it says that the minimum API version is 24 although I set the minimum API version in Unity to API 16 (Another image showing that I set the minimum API version to 16 in Unity). I've als tried to change the minimum API version in the AndroidManifest.xml file but after every build it's API 24 again.Thanks in advance!
Seems my response was deleted because it wasn't an answer, but since then my colleague has gotten in touch with the Mapbox devs, and they've responded here. Apparently, the Android Native GPS Plugin is set to support as low as level 24, which I don't understand given that the site claims the plugin supports much lower, unless I'm misreading it.
However, we implemented the fix in which you uncheck Android on the asset at
Assets/Mapbox/Unity/Location/Plugins/Android/com.mapbox.android.unity-debug
This seems to have worked.
I installed the SDK and I like work with API 7 but when I want to create a new Activity Main I have this problem and I can't create a new Activity, thanks.
This template requires a build target API version of at least 14, and the current version is 7
In the log, I can read this:
Not targeting the latest versions of Android; compatibility modes apply. Consider testing
and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
I recently faced the same problem when creating the activity or while setting the new android application project and able to solve this problem in this manner.
I checked the system image folder which is in sdk/system-images,build tools folder-sdk/build-tools and found that these folder does not have the API's that i am using at Minimum required sdk,target sdk,compile with. In each of these you need to provide the API no. or Android version.
So check that the API's that you are using for(Minimum required sdk,target sdk,compile with) are installed and also check the system-images and build-tools folder should have these API's
if you have done this your problem must be solved.
You probably set Build SDK to API 7. Normally, you should set Build SDK to the highest possible API level and set the other SDK, it's called Run SDK or don't rememeber how to the minimum API version you want your application to run on.
I ran into this same issue even though I had set in my AndroidManifest.xml minSdkVerion to 13 and targetSdkVersion to 19. What fixed it for me was in Eclipse going to Project > Properties > Android then checking the highest API level in Project Build Target box (API 19 for me).
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