i want to build an android project for API 19 so i choose this API to compile with, but when eclipse create the projects its tells me that some ressources are not found and the R class is not generated. the only way to avoid this errors is to compile with API21
So why i can not use my API 19 in compilation ??
THNKS for all
Compile SDK Version can and should always be set to the latest SDK released. It is target SDK version that you should set to the latest version you've tested your app on.
Eclipse by default includes AppCompat - the part of the Support Library which ensures a consistent look and feel across all API versions v7+ and the newest version, revision 21, compiles against API 21.
So why i can not use my API 19 in compilation ?
be sure to have the api installed:
Window -> Android SDK Manager
Related
Warning:The specified Android SDK Build Tools version (19.0.0) is
ignored, as it is below the minimum supported version (26.0.2) for
Android Gradle Plugin 3.0.1. Android SDK Build Tools 26.0.2 will be
used. To suppress this warning, remove "buildToolsVersion '19.0.0'"
from your build.gradle file, as each version of the Android Gradle
Plugin now has a default version of the build tools.
What if I want to develop an apk that can work for API 19?
Is there a way without getting errors to compile and test the application easily?
buildToolsVersion is not your App's minimum API support version. You'll want to use minSdkVersion 19 to support API 19. Generally you'll always want to use the latest build tool version. If you want to test API 19 functionality, download and use the Android 4.4 emulator.
My VS worked well before I synchronized my project with my friend's using GitHub. After that, somehow I notice Visual Studio targets different location to android.jar file. So, whenever I compile my code, I receive the following error.
Could not find android.jar for API Level 24. This means the Android
SDK platform for API Level 24 is not installed. Either install it in
the Android SDK Manager (Tools > Open Android SDK Manager...), or
change your Xamarin.Android project to target an API version that is
installed.
(C:\Users\Joshua\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK\platforms\android-24\android.jar
missing.)
C:\Users\Joshua\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK\platforms\android-24\android.jar is a directory location in my friend's drive.
How to change the target location of that android.jar file in VS 2015?
Looks like your app is trying to use Android N tools to compile or targeting API level 23
Under your Android project properties -> Application, set the Target Android Version and Compile using Android Version to API Level 23 to fix it
Go to android project then right click -> Properties -> Android Manifest (scroll down) then you will see Minimun android version and Target android version.
in vs project -> your application properties -> change target framework to your api version. that's it
I have installed Android SDK tools 22.0.1 and 23.0.3
I want to target SDK version 22.
After chasing previous posts here, I found that people got this to work
compile 'com.android.support:appcompat-v7:22.2.1'
However, I am still getting:
Failed to resolve com.android.support:support-v4:22.2.1
So, I add version 4, then I get same error, twice (below each other)
Which is the latest appcompat support library? Where do you find out the latest version?
This is really frustrating...
Thanks
I have installed Android SDK tools 22.0.1 and 23.0.3
That is irrelevant with respect to using appcompat-v7.
I want to target SDK version 22
Assuming that you mean that you want your targetSdkVersion to be 22, that too is irrelevant with respect to using appcompat-v7.
Which is the latest appcompat support library?
Right now, it is 24.1.0.
Where do you find out the latest version?
In your specific case, go to the Android SDK installation on your developer machine. In there, go to extras/android/m2repository/com/android/support/. In there, you will see directories with the names of all the pieces of the Android Support library (e.g., appcompat-v7/). If you go into any of those, you will see the versions that are available to you.
Now, what is disconcerting about your error messages is that you are getting a failure on support-v4, for a version requested by an appcompat-v7 that apparently is found (otherwise, your error would be for appcompat-v7). This suggests that you do not have all of the Android Support library pieces, perhaps due to a failed installation of the Android Repository from the SDK Manager.
What if I want to compile with SdkVersion 22?
That is not a particularly good idea for new development (vs. maintaining some legacy app). But, if that is what you want, you need to choose Android Support library artifact versions in the 22 series. On my machine, it looks like 22.2.1 is the latest of those.
The latest version is 24.1.0.
You can check it here: https://developer.android.com/topic/libraries/support-library/revisions.html
Change to
compileSdkVersion 23
buildToolsVersion "23.0.3"
and change
compile 'com.android.support:appcompat-v7:22.2.1'
to
compile 'com.android.support:appcompat-v7:23.4.0'
if you want to target sdk 22 add/change
defaultConfig {
//
minSdkVersion 16
targetSdkVersion 22
//
}
Although latest version is 24.1.0 but for that you have to update again from sdk-23 to sdk-24
I am absolutly new in Android development and I have the following problem trying to build a sample project that I have downloaded from Internet.
When I try to build it I obtain the following error message:
Error:Cause: failed to find target with hash string 'android-18' in: C:\Users\Andrea\AppData\Local\Android\sdk
Install missing platform(s) and sync project
So I search online and I found this SO link: Android studio - Failed to find target android-18
Ok so I go into Tools > Android > SDK Manager and infact I have installed Android 6 corrisponding to the API level 23 but not Android 4.3 corrisponding to API level 18.
So what it means? It means that I have installed a different version o the Android framework ?(is it the SDK considerable as a framework or what?)
So, on Android Studio can I install different version of the SDK?
I think that the API level have to be defined in some way into the dowloaded application. How can I specify to this application to don't use the API level 18 but instead it use the installed API level 23 ? I think that it is not a problem because I have installed a newest version that have to support all the stuff of the oldest one, is it?
I will explain the problem a bit for you and then provide you with the solution.
You are facing this problem, because your project is targeting API level 18 to compile the project. So you MUST have API 18 SDK installed to compile the project.
This is why the IDE is complaining that,
Install missing platform(s) and sync project
The SDK is not the framework. The Android framework is same all over, but with different API levels new updates are pushed to the SDK, the latest being API 23, Marshmallow.
You should not download an older SDK to compile the project.
Always try to use the latest SDK available to work with. So, just head over to your build.gradle file or AndroidManifest.xml file and change the compileSdkVersion to 23.
You can either change the compileSdkVersion version in build.gradle to 23 or whatever version you have in your local machine
You can obtain the API Level 18 from the SDK Manager.
I go into Tools > Android > SDK Manager and infact I have installed Android 6 corrisponding to the API level 23 but not Android 4.3 corrisponding to API level 18.
So what it means? It means that I have installed a different version of the Android framework ?
Yes, you have a newer version of the SDK.
on Android Studio can I install different version of the SDK?
Yes, that is what the SDK Manager is designed for
I think that the API level have to be defined in some way into the dowloaded application. How can I specify to this application to don't use the API level 18 but instead it use the installed API level 23 ?
It is defined. Check either the AndroidManifest.xml or the build.gradle file in the module for the app (not in the project root). You should see some combination of minSdk, targetSdk, and/or compileSdk with a number after it. Since you are getting an error about missing SDK 18, then that number will be 18.
I think that it is not a problem because I have installed a newest version that have to support all the stuff of the oldest one, is it?
The support libraries are separate from the core SDK. You cannot run SDK 23 specific code on devices that have a version less than 23, therefore, to be safe, it is recommended that you start with downloading SDK 18, then run it, then try updating the compileSdkVersion number.
I'm using Android Studio. Everything was going good but I updated Android support library to 22 revision and my application UI is changed and In some Activities app is crash.
I want to downgrade the version of Android support library from 22 revision to 20 revision in SDK so I uninstalled Android support library but when I install it every time 22 revision is installed.
How can I install 20 revision of Android support library?
You can check inside the sdk folder in your pc.
androidsdk\extras\android\m2repository\com\android\support
For each support library you will find all versions available.
compile 'com.android.support:support-v4:19.1.0'
compile 'com.android.support:support-v4:20.0.0'
compile 'com.android.support:support-v4:21.0.3'
Pay attention.
If you use the v20+, you have to use the api 21+ to compile your project.
In your app's module there is a build.gradle file. Inside that you will see something like:
compile 'com.android.support:support-v4:xx.x.x'
This is how you dictate which support library is used when compiling the app. You will need to have the version you choose installed in your SDK manager.