Downgrading from API 24 to API 23 - android

I cant drag and drop items either on activity_main.xml file or content_main.xml file. From my research, I learned that I have to downgrade from android API 24 to android API 23, but when I click on API 24 image to downgrade I can't find API 23.

Check the image and download API 23, then restart Android Studio and you will see API 23 too there.
You will see this window, then start the download:

I think you are confusing rendering API level to application API level. You see, the icon above will render according to the API level you chose. That makes seance because some APIs have different overall design.
If you want to downgrade the application API you can change in the manifest (if you are using eclipse) OR change in the gradle settings(if you are using Android Studio) like so:
In the build.gradle(Module app):
defaultConfig {
applicationId "com.shlomi.alarm"
minSdkVersion 17
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
Insert your API level in minSdkVersion.

Simply go to your res directory through your windows explorer there you may find folders like 1)drawable 2)drawable-v24 3)layouts and so on.....
cut all the content from drawable-v24 and paste it into drawable folder.
This solution worked for me.
cheers.

Related

Deploying multiple APK with vector asset (android)

android studio is currently supporting vector assets. according to the literature I can
Create separate APKs for different API levels. When you don’t include
the corresponding raster images in the APK for Android 5.0 (API level
21) and higher, the APK can be much smaller in size. For more
information, see Multiple APK Support.
so I tried creating 2 APIs: -
the pre-lollipop version contains the generated pngs without the vector assets,
while the lollipop version contains only the vectors assets
In http://developer.android.com/google/play/publishing/multiple-apks.html
If an APK you've uploaded for API levels 4 and above (Android 1.6+) has a version code of 0400, then an APK for API levels 8 and above (Android 2.2+) must be 0401 or greater. In this case, the API level is the only supported filter used, so the version codes must increase in correlation with the API level support for each APK, so that users get an update when they receive a system update.
The following is my gradle build file.
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "twitch.angelandroidapps.matchit"
}
productFlavors {
lollipopConfig {
minSdkVersion 21
targetSdkVersion 23
versionCode 3
versionName "21.1.0"
}
preLollipopConfig {
minSdkVersion 10
maxSdkVersion 20
targetSdkVersion 17
versionCode 2
versionName "10.1.0"
}
}
:
//snipped the rest of the build config...
:
however, when I deploy the pre-lollipop version first, followed by the lollipop version, then the pre-lollipop version got archived (and vice-versa).
Any advice on how I can get both versions to be deployed in the play store?
I had it figured out.
When i first deploy the lollipops and pre-lollipops, they get auto-archived.
For some strange reason, I have to manually shift the pre-lollipop version back into production by clicking "Move to Prod" for it to work.
After that, the playstore will show a new "API LEVELS" column.
Also the literature about having a larger versionCode seems to be wrong. Pre-lollipop version needs to always be a lower VersionCode (probably because my API levels do not overlap?). Anyway, I can now deploy new pre-lollipop versions without getting the previous version archived.
In the end, I used the naming convention of
21xxxx for lollipop versions and
10xxxx for pre-lollipop versions
Hope it helps.

Changing API 23 to API 21

I am developing app in API level 23 (Marshmallow) but some methods and libraries are deprecated in API 23 i need to downgrade project to API 21 or API 22. But when i change my API level and build my project it gives error
I have tried all methods all things that are mentioned on this forum but none could helped me..
is give error for some value-23.xml file.. i have changed the name of that file from value-23.xml to value-22.xml but android studio said "FILE usder the build folder are generated and should not be edited"
You have changed your compileSdkVersion below 23, but you are still trying to use a version-23 edition of appcompat-v7. Change your appcompat-v7 statement in the dependencies of your build.gradle file, choosing a version that matches your compileSdkVersion. Or, move your compileSdkVersion back to 23 and address your deprecation issues in some other fashion.

How to make a gradle android app compatible with above api version

I have an app that works fine on API 19. However, I want it to work well in other API's as well. I'm targeting API 10 and above.
My gradle build looks like this:
android {
compileSdkVersion 18
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 10
targetSdkVersion 18
}
}
But when I run the app on API 10 the AVD manager says compatible: no
How should I change my build so that it is compatible for API 10 and above?
Your gradle config looks correct. Be sure to check your virtual device settings and compare to what you have defined in your manifest file. Also be sure to check any other modules you may have added to the project and their respective gradle and manifest files.

Master/Detail flow has minimum api level equal to that in use

When i try to create a new Master/Detail flow activity in Android Studio i am told "The activity Master/Detail Flow has a minimum SDK level of 11.". I understand why this is, but I don't understand why i am being prevented from creating this activity as the min SDK as defined by my AndroidManifest.xml is 11.
I created with a lower minimum but have since changed to 11. When i create a new project with a miniumum of 11, and then change the manifest to use 7 as min SDK I can create a new Master/Detail flow activity. This makes me think there is a project property i need to change, but I cannot find it!
I have tried so far:
downloading all SDKs from 11 upwards
Rebuilding project
Invalidating cache and restarting
setting Min, Target and Max SDK to 18
creating a new activity with "Power save mode" on
This may be late answer but i found same problem.
Here is solution. On your build.gradle there will be following line
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 16
}
}
just change minSdkVersion to 11 and click "Sync Project with Gradel File" icon, then try to create Activity again.
Problem occurred with minimum required sdk, I guess, you have API 18: Android 2.2 (Froyo). Just change it to API 11.

In IntelliJ, how to set the Android API level

I'm using the latest and greatest IntelliJ Community edition. My application runs fine on the android emulator. However, I need the emulator to better match the Kindle Fire. I made the configuration changes in the AVD Manager (including setting device to API 10.)
When I went to my project to configure the project to target the new virtual device, I got the following message: "Build target of AVD DEV3 is not compatible with your build target."
It didn't take much work to figure out that the issue is related to my choice of API 10.
I don't know where I tell my project to use API 10. I looked all over and didn't see any references to the API level at all. Any ideas?
EDIT
I added
<uses-sdk android:minSdkVersion="10" />
to my AndroidManifest.xml file and was able to select the new device. I'm starting it up now.
The answer above is no longer true in Intellij (using gradle)
Now <uses-sdk> is ignored in the AndroidManifest.xml, it is automatically added to the built manifest file. To change the version, go to the 'build.gradle' file and look at the minSdkVersion.
As Tony and Blundell mention, the answer is to declare your minSdkVersion in your AndroidManifest.xml file. In this way, the application will be allowed to launch on any AVDs that at least meet the minSdkVersion.
Here's more documentation on the <uses-sdk> tag:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Set this value in the Gradle file - as shown here:
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.kotlinconverterapp"
**minSdkVersion 26**
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Categories

Resources