I read some stuff on the net about this problem. But the solution presented did not solve my problem.
I've a Android device with enabled usb debugging and Android 2.3.6 running on it. I downloaded Android Studio and downloaded the SDK API 10 (Android Version 2.3.3) and I added the following lines to my AndroidManifest.xml:
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="10" />
I cleaned and rebuilt the project. However, I'm still getting the error:
Failure [INSTALL_FAILED_OLDER_SDK]
Why could this be happening?
I downloaded Android Studio and downloaded the SDK API 10 (Android
Version 2.3.3) and I added the following lines to my
AndroidManifest.xml:
you have to update your build.gradle file (module build.gradle). Those values in the AndroidManifest are ignored
defaultConfig {
minSdkVersion 10
targetSdkVersion 10
}
also you can remove targetSdkVersion, since they are the same value. If you leave it unset, android will pick up automatically the value of the minSdkVersion
Related
My android application is able to install in Oreo & Pie without any problem. If I tried to install the release build in Marshmallow & Nougat version of phone it is throwing an error "There is error while parsing the package" Please find my sdk version in gradle
compileSdkVersion 28
minSdkVersion 21
targetSdkVersion 28
implementation com.android.support:appcompat-v7:28.0.0
implementation com.android.support:support-v4:28.0.0
implementation com.android.support:design:28.0.0
Suppose If I change my compile & target sdk version to 26 does it work in Marshmallow & Nougat devices? If I change to SDK version to 26 and support libraries to 26.0.0 am getting build error like android resource linking failed.
Please help me to resolve this issue and provide solution for my android application should support from marshmallow to pie[latest forward compatibility].
Thanks in Advance
As per your build gradle, I think your buildToolsVersion is not proper.
buildToolsVersion '28.0.3'
Change your buildToolsVersion as per above.
There is no change in your build.gradle file. Please proceed with same configuration "compileSdkVersion 28
minSdkVersion 21
targetSdkVersion 28 " . It looks fine
I guess there is a problem in release apk. Please recheck following common mistake:
Are you installing release apk directly from SD card.( You should not install release apk directly, you need to publish in play console, then only you can use your apk otherwise you should use debug apk only )
Version number ( Whether it is already not used )
Are you renamed your release apk file ? - If you did means please rename back to old name.
Correct the API level in manifest file. ( Cross check with build.gradle file )
Hi Everybody Thanks for the suggestion and comments. Finally I found what is the issue in Nougat 7.0 version.
The issue not with the gradle. Issue due to my package name in project folder i.e Activities,Services,Utilities,Models all the package name has been starts with Capital letter so it throws an error saying that in android manifest file android:name is not defined[not able to recognize while trying to install in Nougat device].
Found issue by installing the release apk in API Level 24 & 25 simulator and found out the error in LogCat.
Once I modified all the package name in my project with small letter i.e activities,services,utilities, now I can able to install the release apk in Nougat version device.
Now unable to install it in Marshmallow device 6.0. This time am getting App is not installed error
Please let me know what am missing for version 6.0 devices.
Thanks in Advance
compileSdkVersion and targetSdkVersion are usually kept similar and by defining this, you tell the app what android devices are you specifically making the app for. So whatever your targetSdkVersion is, the app will run smoothest in this.
minSdkVersion is the minimum sdk that you want to target. So if you want the minimum device supported to be a Marshmallow then the app would not be available for a device having api version below Marshmallow, in fact the app won't even appear on playstore.
I have an old P500 running the latest CM 7.2 Nightly which is of Gingerbread, specifically 2.3.7 which should be API 10, right? I'm working on an app with the following line in the manifest:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />
It's a really basic app where the only permission is android.permission.RECORD_AUDIO and all in all it couldn't be much simpler. I do have the SDK Platform installed for 2.3.3 API 10.
Even if I set min and target both to 10 or even lower, then I still get INSTALL_FAILED_OLDER_SDK when I build and run. No matter what I try, I can't get it to install.
I'm using the latest Android Studio (0.1.8 I think) and Java 1.7u21. The app does install just fine on my CM 10.1 Galaxy S III which is 4.2.2.
I figured out what was causing it. Android Studio doesn't seem to be using AndroidManifest.xml to determine how to build the APK. In the project directory, there exists a file build.gradle that tells what API to build for and it contradicted the AndroidManifest!
Here's the section of the file:
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 17
targetSdkVersion 17
}
}
As soon as I changed minSdkVersion to 10 it installed just fine. It was the only change I had to make.
I have in my manifest:
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="13"/>
I want to allow 2.2 to run my app but i have to have targetsdkversion 13 for admob to work. But eclipse is saying: " Attribute minSdkVersion (8) is lower than the project target API level (13)" and wont even show the avd's for anything below 3.2... but that didn't happen until just a little while ago. I didnt change anything there. whats happening? i've tried to clean it but that didnt help.
It's just be a warning. If you run your app, it should run on any devices from SDK version 8 to 13. Are you not able to generate the apks, and run it?
I used to see the warning in the older version of eclipse and the ADT, but since moving to Indigo and the newer android plug in I no longer get that, it was just annoying but did not cause any other issues.
While creating a new android project in eclipse 3.5, i have selected Android 2.1 Update1 as build target. But i forgot to give the mini SDK version. Now when the build the project, its giving a warning message "WARNING: Application does not specify an API level requirement!Device API version is 8 (Android 2.2)"
The application is running fine..but when i run that application is my Samsung Galaxy S which is having android 2.1, the application is behaving differently.
I have even tried adding
<uses-sdk minSdkVersion="7" /> in the manifest file..But still i am getting the warning message..
So how can i change the mini SDK of my project in eclipse to 7,so that i get the same result in my emulator and Mobile phone?
Thanks in advance
Shijilal
In your manifest there should be something like this
<uses-sdk android:minSdkVersion="int" />
Now just change the number to the desired version number. Additionally you should also change the value of the target in the default.properties file.
i took an android project and imported it in eclipse. in properties->android section it is showing platform 1.6 and API level 4. I have downloaded Android 2.2. Now when i try to make some changes in the source code and make an .apk file and try to install on my android device the device shows an error : Application not installed. the project is not showing any error but it is showing a warning : Attribute minSdkVersion (3) is lower than the project target API level (4) in manifest file. the person who gave me th eproject i asked him to mail his .apk file to me and that .apk file is running perfectly on the device. Please advice.
Change to API level 3 (Android 1.5), that must be the solution. you must have in your manifest.xml defined a minSdkVersion = 3
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
or change the minSdkVersion to Api level 4 at your manifest.xml file that correspond to android 1.6
</application>
<uses-sdk android:minSdkVersion="4" />
</manifest>
build, create and sign your .apk again
alternatively you could try this:
when application run on emulator it creates an .apk file on project/bin folder. you just connect your android phone with usb mass storage and then copy this apk to SD card. it will then install the app on phone by clicking the apk file on phone. i've faced the same problem and now i've successfully installed my apps on t mobile G1.