Adding Xamarin support library v4 - android

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.

Related

Android sdk manager I don't have Android Support Library

I do a Android training and I have to use Eclipse. I created a new project and I get the error
android.support cannot resolved.
I look for the android-support-*.jar.
This is my SDK manager
I don't have Android Support Library package in my SDK Manager. How can I install the package "Android Support Library" ?
You have already downloaded Android support Repository .
To add support library to project, go to android sdk location sdk\extras\android\support , you can find all support libraries there .Add what ever library you need as a dependency
i guess you have to add V7 appCompact
If you are using linux. Try doing this in the terminal, it worked for me at some point in time. Don't know if it still works:
:~$ android list sdk -a --extended|less
This will list all the packages plus the extra-androidm2-repository because of the --extended option. After this you can the type:
android update sdk --no-ui -a --filter "extra-android-m2repository"
This will proceed to download the extra support repository, and place it in the $ANDROID_HOME/extras/android/m2repository/.If that does not work try downloading the zip file here. This is still not the end of it because you still have to find a way to use it and
This is why you should move to Android studio
The structure of android support repository changed to the .aar format. This means you cannot import the library as you would have with earlier support versions. You have to use maven plugin in eclipse to manage the libraries.
Maven central does not have the latest android support libraries, hence you have to use maven android connector.
If you want to read more, on how to Mavenize your project and use maven for android libraries read this. I found it personally to be very hard compared to android studio where you just have to add a dependency in gradle. Good luck.

Can't find Android Support Libary in Android SDK Manager

problem already explained in the topic. I already looked at:
Can't find Android Compatibility Package on SDK Manager
Can't find Android Support Package
Cant' find Android Support package
Android Support package not present in SDK Manager
Cannot find Support Package in Android SDK Manager
cannot find android support library
I made a screenshot with the things I can see:
Furthermore I'm using NetBeans. Hope you can help me
Download me
Download, unzip it and put it into the androids sdk\extras\android Folder. Than the Android Support Library should show up

Use custom SDK in android studio to access new API

I am working on a school project which needs to customize AOSP. I have built an new API, also I have written apps that used these new API and they were compiled in my AOSP, they work just fine.
Now I have also compiled a SDK in my AOSP. I followed the instructions on this link to change the SDK path in android studio:
Android Studio - How to Change Android SDK Path
However, android studio still cannot resolve my new API. Does anyone have any idea on What I have done wrong? Or do I have some missing SDK tools that I need to install?
AOSP: android-5.0.2_r1
OS: Ubuntu 12.04
You will need to build the SDK from your custom version of AOSP. To do this you will need to build the 'sdk-eng' version using lunch and use the 'make sdk' build command. You can find detailed instructions inside the source code of AOSP. Here is a link specifically for the branch of AOSP you are building.
This will produce a custom framework.jar file which contains the Android API for your custom version. These files will just be stubs that do not contain actual code but do provide the API for developers to use. When building your application you will need to reference this framework.jar as your project SDK instead of one of the standard Google provided jars. This SDK jar should not be a compiled dependency as if will be provided by the custom version of Android you are running the application on.
Go to the folder in:
Android/Sdk/platforms/android-21/
Replace the android.jar with your custom made android.jar SDK and then inside Android Studio go to:
File --> Invalidate Cache & Restart

How to check version of android-support-v13.jar

I have an android project developed on eclipse. I migrated it to Android Studio and updated the support libraries. It started showing some weired behavior related to UI. The project had some nested scrolling functionality which was not supported then. Now the support library itself provides support for nested scrolling so that is causing problem. Is there any way through which we can know what was version of support library.jar? Since in eclipse we used to add jar files in the libs folder.

Android SDK does not show the Android support library

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

Categories

Resources