Android SDK does not show the Android support library - android

I am new to Android development. I just installed Android SDK and with required packages.
In eclipse, I created my first Android project and came through all the steps of the wizard until the final step. In the last step, when I finish the creation of the project, the wizard does not disappear, but the project gets created with some errors(which are some popular errors among developers).
the error is :
Error retrieving parent for item: No resource found that matches the
given name 'Theme.AppCompat.Light'.
I came through a suggestion given here and the suggestion is to install
the Android Support Library.
But in my SDK manager, it does not show the package for Android Support Library. under Extras. Why is that? How can I install the Android Support Library. using my SDK manager.
A screen shot of my SDK manager is given below. You can see that Android Support Library is not there even though support repository is there.

Found the solution finally.
RMB on the project
Android tools -> Add support library
It will install the Android support library(In my case it installed an obsolete version. I do not know why)
Then, in the SDK manager, Android Support Library can be seen after adding a tick to show the obsolete packages.
But cannot update it. Don't know why
Clean and build the project
Follow steps here

Related

Visual Studio 2015 - Adding Android Support Library v4 and v7 to use DrawerLayout and ActionBarDrawerToggle

I am trying to add these 2 support libraries to my project through Nuget Manager in Visual Studio in order to be able to use DrawerLayout and ActionBarDrawerToggle. However, both libraries are failing to install with the same error:
*****Could not install package 'Xamarin.Android.Support.Compat 24.2.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.***** (the screenshot of the error is also provided at the bottom)
Below are screenshots for these 2 libraries as shown in VS2015 Nuget Package Manager:
Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat v 24.2.1
I have installed SDK Platforms in my Android SDK Manager from API19 to API25 and in Extras, I have both Android Support Repository and Android Support Library as can be seen below:
And I have installed Android SDK Tools, Platform-tools and Build-tools from 19 to 25.2.2:
Once I select to install these 2 libraries to my project and hit OK on Review Changes dialog and Licence Acceptance dialog, the installation fails with error like below:
The Xamarin.Android.Support.Compat 24.2.1 NuGet package contains assemblies for MonoAndroid v7.0. So you will need to change the target framework of your Android project to be 7.0. You should be able to change that in the Visual Studio project options.
You may need to update your Android SDKs if v7.0 is not available.
See also this forums post.
It appears that all I needed to do is to restart my Visual Studio.

Where is Android Support package in the Android SDK Manager?

I am using Intellij Idea (same thing as Android Studio). Today I decided to update packages in Android SDK Manager, and during the update, my computer crashed. When I rebooted Ubuntu, the android executable was missing. So I re-extracted the android-sdk and got it working again. However, some jar files are missing, as shown in the attachment.
Apparently, when I installed all the necessary packages in the SDK Manager, I missed a package pertaining to android-support-v4.jar. I googled and found this link. It says download Android Support package under Extras. But I do not see it. I just see something called Android Support repository. Is it the same thing? If not, where can I get the Android Support package?
The Android Support Repository is the only entry still being updated and is all you need to run a Gradle based builds.
The now obsolete 'Android Support Library' package can be found by checking the 'Obsolete' checkbox in the bottom left and allows you to use at latest version 23.2.1.

Adding Xamarin support library v4

Can you please suggest me how do I manually add xamarin support library v4 jar file to the Components or some other way so that I would be able to use DialogFragment and other features.
The same question has also been asked in this but no one has proposed the solution.
I am actually working on xamarin using visual studio 2012. I am unable to use DialogFragment and other features because of not proper configuration of xamarin support library v4 in visual studio. I have already installed xamarin support library v4 using sdk manager and it exists in C:\Users\username\AppData\Local\Android\android-sdk\extras\android\support\v4
but visual studio is not loading this library, although it loads automatically. This path contains android-support-v4.jar and src folder as well.
I have also tried installing using nuget but I get the following error
Could not install package 'Xamarin.Android.Support.v4 22.2.1.0'. You
are trying to install this package into a project that targets
'MonoAndroid,Version=v2.2', but the package does not contain any
assembly references or content files that are compatible with that
framework. For more information, contact the package author.
The Xamarin.Android.Support.v4 supports android 1.6 and higher.
I have looked on this answer but it did not help me.
Thank you.

The styles.xml file is not generated in my android project

Recently I updated my eclipse Juno to Luna, but now the new project don't generate the android.R file. This probably caused by this AndroidManifest.xml error:
Error: No resource found that matches the given name (at 'theme' with value '#styles/AppTheme').
When I check the values folder, there is no styles.xml.
This only happens with the new projects, the existing projects (which I created in Juno) work fine.
I've tried updating everything in SDK manager, but I still get the error.
I don't know the specifics, but I just fixed this on both my Linux machine and Windows machine. It stops producing the style.xml after you upgrade your Android SDK Tools to revision 24 or higher.
I fixed mine by downgrading as seen at this other SO discussion using the version 23.0.5 (I'd post direct links, but I don't have enough points here to post more than two).
Again, I have no idea WHY this is happening, only that it prevents me from creating new projects with the latest SDK.
I met the same problem when I updated my Android SDK Tools. When I build a new Android project, it doesn't generate the styles.xml in res/values/. But after I builded a new styles.xml and copied content from other project, the problem disappeared.
The error has been corrected in Android SDK Tools 24.0.2. I just test it now.
If it happened during your first Andriod App build, it must be just like my case.
It happened to me when Eclipse(Luna)/AndroidSDK(not Android Stduio) were used with the latest tools and library as of Jan. 14, 2015 during the project like HelloWorld. When I installed those tools and made HelloWorld the first app, I accepted all the defaults. - This is the problem in my case.
First, check whether or not the "Android Support Library" library is installed.
If not, install it. It is not installed by default.
You may do it all in "Android SDK manager" available in the menu.
(Android SDK Manager -> Extra -> Android Support Library)
Blessings,
(a debtor)<><

How to make project supported to the latest API, when it was created in lower API?

I receive an error from my already successfully runned project, when I import it in another eclipse on a different system.
The error i get is:
Can't resolve the target sdk"17"
What,ll I do to support that,s projects on sdkmanager that support API level-18?
Open the android SDK and download the SDK version 17. You may have to restart Eclipse or do a project -> clean to make it work correctly.
Or else, just right click the project, go to properties, and under the 'Android' option, you can view a list of the SDKs you currently have installed.

Categories

Resources