PreferenceFragmentCompat not found on Eclipse [duplicate] - android

I'm currently using Eclipse ADT 23.0.7 for android app development. My SDK manager is updated for Android 6.0 shown in below..I want to use v7 Preference Support Library in my project. but, unfortunately I can't found it in my (sdk)/extras/android/support/v7 directory as stated in Android Developer Website. I can't figure out what to do. Thanks in advance for any kind of help!UPDATE 1I've also tried to re-download the library but, nothing happen. Preference library is still missing.

Google stopped to provide Eclipse projects. It pushes developers to migrate from Eclipse to Android Studio. So all libraries are available as *.aar files
But it is still possible to these files in Eclipse.
Find the aar for your library at \android-sdk\extras\android\m2repository\com\android\support\preference-v7\23.0.1\
Then use instructions from CommonsWare guy Consuming AARs from Eclipse:
UnZIP the AAR into some directory.
Create an empty directory that will be the home for the Android
library project. For the rest of these steps, I will refer to this as
“the output directory”.
Copy the AndroidManifest.xml, res/, and assets/ directories from the
AAR into the output directory.
Create a libs/ directory in the output directory. Copy into libs/ the
classes.jar from the root of the unZIPped AAR, plus anything in libs/
in the AAR (e.g., mediarouter-v7 has its own JAR of proprietary bits).
Decide what build SDK you want to try to use. You might just choose
the highest SDK version you have installed. Or, you can use the
android:minSdkVersion and the -vNN resource set qualifiers to get
clues as to what a good build SDK might be. If desired, create a
project.properties file with a target=android-NNN line, where NNN is
your chosen build SDK. Or, you can address this in Eclipse later on.
Import the resulting project into Eclipse, and if needed adjust the
build SDK (Project > Properties > Android). Also, you will need to
attach to this library project any library projects it depends upon
(e.g., mediarouter-v7 depends upon appcompat-v7).

Related

Can't find v7 Preference Support Library in Eclipse ADT

I'm currently using Eclipse ADT 23.0.7 for android app development. My SDK manager is updated for Android 6.0 shown in below..I want to use v7 Preference Support Library in my project. but, unfortunately I can't found it in my (sdk)/extras/android/support/v7 directory as stated in Android Developer Website. I can't figure out what to do. Thanks in advance for any kind of help!UPDATE 1I've also tried to re-download the library but, nothing happen. Preference library is still missing.
Google stopped to provide Eclipse projects. It pushes developers to migrate from Eclipse to Android Studio. So all libraries are available as *.aar files
But it is still possible to these files in Eclipse.
Find the aar for your library at \android-sdk\extras\android\m2repository\com\android\support\preference-v7\23.0.1\
Then use instructions from CommonsWare guy Consuming AARs from Eclipse:
UnZIP the AAR into some directory.
Create an empty directory that will be the home for the Android
library project. For the rest of these steps, I will refer to this as
“the output directory”.
Copy the AndroidManifest.xml, res/, and assets/ directories from the
AAR into the output directory.
Create a libs/ directory in the output directory. Copy into libs/ the
classes.jar from the root of the unZIPped AAR, plus anything in libs/
in the AAR (e.g., mediarouter-v7 has its own JAR of proprietary bits).
Decide what build SDK you want to try to use. You might just choose
the highest SDK version you have installed. Or, you can use the
android:minSdkVersion and the -vNN resource set qualifiers to get
clues as to what a good build SDK might be. If desired, create a
project.properties file with a target=android-NNN line, where NNN is
your chosen build SDK. Or, you can address this in Eclipse later on.
Import the resulting project into Eclipse, and if needed adjust the
build SDK (Project > Properties > Android). Also, you will need to
attach to this library project any library projects it depends upon
(e.g., mediarouter-v7 depends upon appcompat-v7).

Importing android gradle project into eclipse

I need to import this library project into my eclipse. While i am trying to use this project it have some error. Can you help me on this. https://github.com/daimajia/AndroidImageSlider
That project is created for use with Gradle for Android. Eclipse does not support that yet. It is also distributed as an AAR, which Eclipse does not support. There are recipes for converting AARs into Eclipse-friendly Android library projects that you can try. Otherwise, you will need to reorganize the project code yourself to support the classic Eclipse-style project structure. Mostly, that will involve moving the contents of library/src/main/ into a regular Eclipse Android library project:
The res/ directory and AndroidManifest.xml file would go in the library project root directory
The java/ directory would be renamed src/ and also go in the library project directory
However, you will have to repeat this process each and every time the library's author updates the library, at least for those updates that you are interested in.
You may wish to see if there is an alternative library that meets your needs but is better packaged for use with Eclipse.
Basically there are some changes to be done to eclipse project before importing it to eclipse like src folder.
The project you posted may contains many error since it have two more android project dependency.
I tired to convert above project with its dependency :
Checkout Complete Source Code
There is one more project lib u need to add LIB

Unity3D and AAR

Has anyone found a good way to utilize Android .aar libraries within Unity3D, other than unzipping them?
Snippets from the Unity 4.2 Release Notes:
Android: Added support for Android Library Projects (no compilation
support, so the libraries have to be pre-compiled).
Android: Remove Eclipse project support in favor of Android project support.
Android: Support for Android SDK rev22.
The Unity documentation clarifies
Pre-compiled means all .java files must have been compiled into jar files located in either the bin/ or the libs/ folder of the project.
I'm familiar with using the jar + res/ solution; but I am specifically trying to identify the best way of incorporating the precompiled aar. Is there something better than unzipping it?
With Unity 5, just place .aar files in the project. (They don't even need to be in /Plugins/Android anymore, just check the inspector and make sure they are turned on for Android platform).

How to distribute an Android Library

I've been spinning a jar for android library project and including this jar in my other apps. But on developer.android.com, I see this statement that I can't distribute a library in a jar:
You cannot export a library project to a JAR file
A library cannot be distributed as a binary file (such as a JAR file).
This will be added in a future version of the SDK Tools.
I really don't understand what does that mean.
It is possible to create an Android library project that does not
include source code. The limitations are:
You still have to ship the resources.
You have to rewrite your code to avoid using R. values, as they
will be wrong. You will have to look up all resource IDs using
getResources().getIdentifier() and/or reflection.
I have the instructions in The Busy Coder's Guide to Advanced Android
Development (http://commonsware.com/AdvAndroid), though the
instructions are new enough that none of my free versions have them.
Quoting some of the instructions from the current edition:
"You can create a binary-only library project via the following steps:
Create an Android library project, with your source code and such –
this is your master project, from which you will create a version of
the library project for distribution.
Compile the Java source (e.g., ant compile) and turn it into a JAR file
Create a distribution Android library project, with the same
resources as the master library project, but no source code
Put the JAR file in the distribution Android library project's libs/
directory
The resulting distribution Android library project will have everything a
main project will need, just without the source code."
Personally, I'd just wait a bit. I am hopeful that the official
support for library-projects-as-JARs will be available soonish.
It means that (at the current time) you must distribute your entire project folder. Rather than just a jar file like you can for java libraries.
When someone wants to use your library they will import your project into eclipse, and then in project properties->android they will add your project as an android library.
A few common ways used to distribute a Library project are by using git, or zipping your project folder and making it available online.

What does checking the "is Library" checkbox do "Under the Cover"?

I noticed that when I convert an existing Android Application project to an Android Library project by checking the "is Library" checkbox, nothing changes in the project's source code or XML files.
So what really happens when the "is Library" checkbox is checked? What changes internally, in the package and/or project files? Where can I learn more about this?
To better explain my question:
What I am interested to know (mainly
for troubleshooting purposes) is
what differentiates an Application package from a Library
package "under the cover"?
Is the fact that a project is
"Library Project" marked
somewhere? If so, where does it
mark it (obviously not in the source
files and not even in the res XML
files)
From the Managing Projects from the Command Line page:
The create lib-project command creates
a standard project structure that
includes preset property that
indicates to the build system that the
project is a library. It does this by
adding this line to the project's
default.properties file:
android.library=true
In other words, it's a property that is utilized by the build system and not by the operating system.
UPDATE: I'm on my iPhone so I won't type out a whole paraphrase, but here's a pretty good blog article discussing the differences between a Java JAR and an Android Library Project, including how the dex tools add the resources and dex code to the .apk:
http://devmaze.wordpress.com/2011/05/22/android-application-android-libraries-and-jar-libraries/
From the devsite: http://developer.android.com/guide/developing/projects/projects-eclipse.html
You can also designate an Android
project as a library project, which
allows it to be shared with other
projects that depend on it. Once an
Android project is designated as a
library project, it cannot be
installed onto a device.
A library project isn't packaged as a seperate redistributable file as you're used to with a jar. It's merged with the the apk file of your application.
The page you linked to mentions it in the Referencing a library project section.
As soon as the Properties dialog closes, Eclipse rebuilds the project, including the contents of the library project.

Categories

Resources