I am currently doing some testing on Android 13 Tiramisu and am having trouble getting the app to install on my device.
I have installed Android Tiramisu Preview (Rev.4) in Android Studio.
I created a sample app and configured it as follows
// build.gradle
android {
compileSdkPreview "android-Tiramisu"
defaultConfig {
applicationId "com.example.myapplication"
minSdk 16
targetSdkPreview "Tiramisu"
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
...
I then tried to install this app on my Android 12 (not Tiramisu) device.
When I did so, I got the following error
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
List of apks:
[0] '/Users/myuser/dev/sample/MyApplication/app/build/outputs/apk/debug/app-debug.apk'
The application's minSdkVersion is newer than the device API level.
In build.gradle, I have specified minSdk 16, so it should be possible to install the app on an Android 12 device.
How can I solve this problem?
(This problem did not occur when targetSdkVersion was set to anything other than Tiramisu)
This is working as intended: targeting / compile with a pre-release version of Android will only work on pre-release device, before SDK is final. The error returned could be clearer, as it is misleading right now.
Related
I just installed Android Studio Arctic Fox (2020.3.1) Stable
i opened my project as usual and oponed the emulator to try the app but weirdly android studio doesn't get app is running on emulator, so i tried my real phone yet same result still gives me the green play button even when app is running on emulator, my previous android studio was 4.1.1 and everything was fine, tried to create new emulator device yet still same problem
emulator is pixel 4 XL android 9.0
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.minidev99.euroimpianti"
minSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "1.0"
and evenLog show this:
bad sub-command
com.android.ddmlib.CommandFailedException: bad sub-command
at com.android.ddmlib.EmulatorConsole.processOutput(EmulatorConsole.java:424)
at com.android.ddmlib.EmulatorConsole.getOutput(EmulatorConsole.java:411)
at com.android.ddmlib.EmulatorConsole.getAvdPath(EmulatorConsole.java:402)
at com.android.ddmlib.internal.DeviceMonitor.setProperties(DeviceMonitor.java:296)
at com.android.ddmlib.internal.DeviceMonitor.updateDevices(DeviceMonitor.java:260)
at com.android.ddmlib.internal.DeviceMonitor.access$400(DeviceMonitor.java:56)
at com.android.ddmlib.internal.DeviceMonitor$DeviceListUpdateListener.deviceListUpdate(DeviceMonitor.java:326)
at com.android.ddmlib.internal.DeviceListMonitorTask.processIncomingDeviceData(DeviceListMonitorTask.java:195)
at com.android.ddmlib.internal.DeviceListMonitorTask.run(DeviceListMonitorTask.java:131)
at java.base/java.lang.Thread.run(Thread.java:834)
I am trying to upload my instant app with targetSdkVersion 25 and my installed app is also with targetSdkVersion 25.
When I try to upload my instant app on play console, I am getting the following error,
I do not see in documentation that it is mandatory to support targetSdkVersion 26. What am I missing here ?
I cannot update my targetSdkVersion to 26 since targetting for my installable and instant app should be same.
My installable app must have targetSdkVersion of 25 for now due to a dependency. Can I upload my instant app with targetSdkVersion of 25 ?
Read Prepare your development environment.
Android SDK Build-Tools 26.x or higher
Android SDK Platform Tools 25.x or higher
Android SDK Tools (latest)
You should set
compileSdkVersion 27
buildToolsVersion '27.0.3'
And
defaultConfig {
targetSdkVersion 26
}
As Android evolves with each new version, some behaviors and even
appearances might change. However, if the API level of the platform is
higher than the version declared by your app's targetSdkVersion, the
system may enable compatibility behaviors to ensure that your app
continues to work the way you expect.
For those who are still wondering about this issue. Google imposed a restriction that both Instant app and install-able app should target at least 26.
I'm using Android Studio 3.0.1 and building applications for SDK with following settings:
flavorDimensions "default"
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.logi3pl.wms.wmsmobile"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.1.23"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
After a recent update, none of my AVD emulators are accepting uppercase 'B' from keyboard. Lower case 'b' and all other chars are working upper/lower case. On-screen keyboard accepts uppercase 'B'.
Not only the software I am coding, but also google search bar and every other app on the device has the same problem.
Don't know even where to look at. Appreciate any help.
Thanks in advance
I have got the same problem, using Android Studio 3.01, Android 7.1.1 (emulated Pixel API 25).
I filed a report to Google.
Update:
They fixed it in Version 27.0.5
Just downloaded the newest update. The problem seems to be fixed.
I have buyed a Android app but Author not respons more.
App was created to this versions:
Android 4.0, Android 4.0.3, Android 4.0.4, Android 4.1.x, Android 4.2.x, Android 4.3.x, Android 4.4.x
Now we also have 5x and 6x so my questions are:
How can i do it so it works with newest version to Android?
I have full source code for this app.
Change your build.gradle file configuration to the Android API level you're looking for.
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.your.package"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
}
API:
19 - 4.4 - 4.4.x
21 - 5.0 22 - 5.1
23 - 6.0 - 6.0.1
24 - (Android Nougat)
Source
You will need to update the build.gradle to target newer versions (although the app may run fine on newer versions without it).
Moreover, you should be updating your code to explicitly request permissions for Marshmallow and Nougat, as outlined here.
Configure your build.gradle, and update targetSdkVersion to android version which you wanted.
I am new to android and I have develop the app with 5.0.1 target. However, when I run the app in my mobile which has 4.4 version of android, it does not run the app that is due to version mismatch. My question is, in which version we can develop the android app which can run on all android device?
If you work on eclipse set in the AndroidManifest.xml the minSdkVersion to something below 20 (i recommend 15) and it will work also on your device:
<uses-sdk android:minSdkVersion="15"
android:targetSdkVersion="21"/>
Here you can find the sdk values for versions:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
If you work on Android Studio go in your build.gradle file and set under defaultConfig your preferences on sdk:
defaultConfig {
applicationId "mybundleID"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
UPDATE
I read now that you wanted to support ALL android devices so you can put minSdkVersion equal to 1. But i think that this is the worst thing you can do! Putting the minSdkVersion you will not be able to use some method and some libraries. You have to support the majority of the devices for a good application. As i said values between 11 and 15 are the most used now!