APK incompatible with older version - android

I was trying to install the APK I compiled from Android Studio but it seems like the APK generated is not compatible. Below is the image for my settings:
Properties
http://prntscr.com/ef0rjs
Flavors:
http://prntscr.com/ef0rr6
The phone im installing the APK is Lollipop 5.1
thanks

can you show here your Android Manifest or build.gradle?
just install the versions in your SDK Manager :)
but try this one in your build.gradle set your minSDK to lollipop
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "app_name"
minSdkVersion 16 //change it to the version of lollipop :)
targetSdkVersion 24
versionCode 1
versionName "1.0"

Related

This app was built for an older version of Android and doesn't include the latest privacy protections

Today I started to get this annoying message (when installing APK outside the Google Play):
This app was built for an older version of Android and doesn't include
the latest privacy protections
What is this message? What should we do?
I believe that it's because of the targetSdkVersion but can't find anything about it.
^^^^ UPDATE ^^^^
It turns out that when I changed targetSdkVersion from 24 to 26 - the message disappeared.
It seems that Google started to enforce using minimum targetSdkVersion of 26 for APK installed outside the Google Play Store.
So you'll have to updated your targetSdkVersion in the AndroidManifest.xml file in your project.
I also had your problem
To fix the problem, just put your target SDK on the latest version
for example
android {
namespace 'ir.galaxycell.kako'
compileSdk 33
buildFeatures{
dataBinding true
}
defaultConfig {
applicationId "ir.galaxycell.kako"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Can Andriod Studio 2.3.3 support new feature, Fonts in XML, which lets you use fonts as resources? I am working on Mac OS

I followed each and every step given on
https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html
I am not able to create Font resource file at the following step -
Right-click the font folder and go to New > Font resource file. The New Resource File window appears.
I am doubtful now, whether I can assign fonts in XML in Android Studio 2.3.3
my build.gradle is as follows
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.crescomobilitysolution.navigationdrawerexercise"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
No, it s supported in Android Studio 3.0 and over

My target SDK version is 25 but Google Play says app only supports 4.1-4.4 devices?

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.abc.ege"
minSdkVersion 16
targetSdkVersion 25
versionCode 3
versionName "1.1.3"
vectorDrawables.useSupportLibrary = true
}
}
Although my target sdk version is 25, when I upload the apk to play store, it says "not compatible with devices with android version 4.4 and over, where is the problem?
edit: app works fine on emulators and there is no hardware access in manifest file
I think you should lowerize targetSdkVersion to 24, as 25 (7.1) is not released yet.
Solved the issue. Looks like an external library's android manifest file maxSDK is set to 19.

What is the buildToolsVersion for android SDK 24?

There's not much I can say about this. Oh well. Google released a new version of android called Nougat (android N). It is compileSdkVersion 24. However, on the build tools page in the official documentation, it is not mentioned.
I want to give my app to 100% of the people using Google Play Store, which includes android N users.
tl;dr: What should I fill in the buildToolsVersion field?
Thanks.
buildToolsVersion
Using android gradle plugin version > 3 you can remove the android.buildToolsVersion property
Quoting from the New Features section of the Android Gradle plugin release notes for version 3.0.0:
You no longer need to specify a version for the build tools. By default, the plugin automatically uses the minimum required build tools version for the version of Android plugin you're using.
[minSdkVersion, targetSdkVersion, compileSdkVersion]
buildToolsVersion should be set to 25 and 25.0.0, as seen below:
compileSdkVersion 25
buildToolsVersion '25.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
You can get the latest buildToolsVersion from SDK Manager in Android Studio.

Gradle project sync failed android studio

I downloaded Arc library form github and imported it as module then I got this error.
Error:Cause: failed to find target with hash string 'android-4' in: C:\Users\shahek\AppData\Local\Android\sdk
Open Android SDK Manager
I also installed Api 15.
This is my build.gradle setting.
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.shahek.myapplication"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
You must install version 23 and all this things must be solved.
If it don't help you,
try to download this library from github and add into project and modify min sdk version in gradle/manifest to yours 18.
Good luck.

Categories

Resources