I have set the minSdkVersion to 15 and build target to 19 in project properties. I am using Eclipse. I have created 2 AVDs. On with sdk 15 and the other with 19. When I run the project, Eclipse shows me only the AVD which is build with sdk 19. Should it also not show the one with sdk 15 since i have mentioned minSdkVersion as 15? Does this mean my app will not be shown to devices which are running sdk 15 in the market place?
minSDKVersion means the minimum supported version so the app will show up for devices running sdk 15. For me, in Eclipse, all supported emulators show up in android device chooser.
More info : http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Related
I'm very new to Android development and this is one of my first projects. I realized that my API Level is set to 20 when datepicker gave an "exception rasied during rendering" error.
I wanted to change the API level to 19 as the API 20 is set to wearable devices. I have installed the API 19 SDK but it doesnt appear for selection during development.
I have also tried to set -
minSdkVersion 10
targetSdkVersion 20
on build gradle but it doesn't work.
I cannot run the emulator as the API is set to 20 and it will display error on a watch :(
How do I set make the API 19 as one of the options during development as I already installed the SDK?
Set
compileSdkVersion 19
in your build.gradle.
minSdkVersion and targetSdkVersion control app installation and runtime backwards compatibility modes, not the SDK you build with.
I installed Api level 20 and 19 after installing 0.8.1 and created a brand new project. But in the renderer (preview) of an activity.xml I don't see the right L version rendered. I see the API L on the drop down which is selected but the phone looks like the HALO effect even on L.
Before installing the level 20 and 19 it did seem to work. But a new project now creates the following gradle file and there is v21 theme; it is always set to
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
Before installing 19 and 20, I noticed a values-v21 directory but it never creates it now.
Here is a copy of my gradle that gets created. I have tried playing around with these values but it doesn't work.
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.tester.myapplicationtest"
minSdkVersion 15
targetSdkVersion 20
versionCode 1
versionName "1.0"
The strange thing is before installing api 19 and 20 I think it was working.
On New Project it never asks me for the sdk or max version just a min version which I leave at 15.
The reason I downloaded api 20 and 19 was that when I am building a production app I presume that this is a better api to build against due to the nature of L preview (beta). However, I didn't realize it was going to stop creating the correct Android new project template.
You have to manually set the compile target to L-preview. Go to File->Project Structure, select your module, under the tab "Properties" there is a "Compile Sdk Version". Change to "android-L". Make sure you have updated the latest build tools(version 20) too.
I had the same problem too. I had installed API 20, 19, 15 and 10 but Android Studio was not rendering the .XML file. Sometimes Android Studio never generated .java and .XML files too.
I figured out that having any versions of Eclipse (Kepler, Juno or ADT) on the same computer made Android Studio not to work properly and show rendering problems.
The solution to this is to delete the eclipse installation which you are using and .eclipse folder in C:\users\user-name\ and later run Android Studio. You can install Eclipse once Android Studio works. Both Android Studio and Eclipse runs fine now.
I was using Nexus S in eclipse and now I changed it to Galaxy Nexus. Now I want to change api level from 15 to 16. I went through project->properties->android but it is showing only two option 15 and 8 for api level and it is for previous version of android that is Nexus S 4.0.3 and 2.2 respectively. How can I change api level to 16 for galaxy Nexus.
You have to download the sdk for api level 16 you can get it from here download the file manually and place it inside your sdk folder or you can open your sdk manager and download it from there
Did you install the corresponding sdk (16) ?
Check this doc for details
http://developer.android.com/sdk/installing/adding-packages.html
I suggest you to install the Android sdk plugin for eclipse
http://developer.android.com/sdk/installing/installing-adt.html
and then you will be able to download the API you need;)
Open your SDK manager ->>Go to tools -->> Go to option ->> and check if option for "Force/https:..."is checked.... And than go back you will see all the api's.Check only that Api which you want to install.
I've been testing an Android app on a device that had API version 15 installed. I now have to switch to a different device (a Samsung Galaxy Nexus, if it matters) that has version 14. Even though I changed "project build target" from Google APIs 15 to 14, I still get the following message when I try to execute the app on the new device:
ERROR: Application requires API version 15. Device API version is 14 (Android 4.0.2).
Cleaning all projects did not help. Restarting Eclipse did not help. I created a simple new test app with target=14 and it worked fine.
Why changes to the old project are not taking effect?
Thanks!
You have to change the minSdkVersion in your AndrodManifest.xml. See this post and the blog entry it is based on for details.
Today I upgraded to SDK version 3.0 from 2.3.3. I have one question that has always puzzled me.
My code is unchanged from when I built it with build target API level 7, so there are no API level methods called. I've now changed the Properties/build target to API level 11 but set the minSdkVersion to level 7 in the manifest.
When I set up a run configuration under Eclipse, the only AVDs available to me are level 11. Should not the level 7 AVDs (which do exist on my machine) be available as targets?
If not, what use is setting the minSdkVersion to 7, as I can't test it on a level 7 emulator?
In the Debug configuration panel for your app, you have to go to the Target Tab and change the Deployment Target Selection Mode to 'Manual' and once you click on Debug button, you'll get a "Android Device Chooser" dialog where you can specify which AVD to startup.