Correct way to add android libraries with ADT 14 > - android

After updating to ADT 14/15 I started having a couple problems with our build.
With one Android based libraries (call it Framework) which is added into the actual android project app (call it App). The Framework project has a couple jar files in its own lib folder which is added to its own build path. Those same jar files are required to be added to the App's build path as well.
So jar files on the Framework build path
Framework/libs roboguice
Framework/libs gson
Those same jar files on the App build path
Framework/libs roboguice
Framework/libs gson
Also the Framework.apk is added via the Android Library panel in the App's project properties.
Both projects are targeting the same Android.
Now when I build the project I seem to have resolved the errors however when running it, at times I receive the Missing Framework.apk in the console window.
So based on this scenario any thoughts on how to correct this build? I have a feeling its still setup incorrectly.

This should help you out!
http://android-developers.blogspot.com/2011/10/changes-to-library-projects-in-android.html

Related

PreferenceFragmentCompat not found on Eclipse [duplicate]

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).

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

Library Project Supporting Eclipse and Android Studio

I'm working on a library project that provides access to a service. We started the project few months ago and we were supporting Eclipse only (since Android Studio was a prewview edition).
Now that Android Studio has become a "beta" version, and its popularity has increased greatly, we had the intention to support it as welll, but we are facing the problem of how to support both "styles" with the same base (project structure and code).
The library we are building has a UI that forced us to have the library as library project instead of just a simple jar. We have this project working with ANT to build the required files (jars) and packaging everthing in a library project.
Android Studio now introduces the .aar library files, that can also contain UI.
So our problem is finding examples of other library projects containing UI that are also supporting both IDE's. Wondering if someone else have face this same situation.
Is is possible to have a Library Project to support both IDEs? (Eclipse and Android Studio)
Thanks to #CommonsWare. When I looked at your projects I realize that we didn't need our project to be "Android Studio compatible". Since we wanted to share the project as an .aar file, I had only to make a build.gradle at the root of my library project and add the gradle folder (containing the gradle wrapper jars).
In this way I can use the console and create a .aar file using "./gradlew aR" command. Now I can distribute the library project for Eclipse users or the .aar file for Android Studio users.
I'm testing the .aar file, and the only problem I have right now is that classes inside a jar file within libs folder inside the .aar file are not recognized, just the classes present inside "classes.jar", but I think I would create another question here in SOF since is not relevant for this question.

Building and including an external module in an Android app

I would like to include this plist parser module in my Android application, ideally without just copying the entire module source into my source tree (if that would even work).
I have successfully added the module as a project into Eclipse (3.7.0) and resolved errors by fixing the build path to include Android 2.1, which is what I am using. However, now I'm stuck. All of the information on using external libraries with your Android project I can find expect you to have a JAR of the library, but I only have this source code. I can run the plist parser module as an Android application, which appears to compile an .apk, but that doesn't actually do anything because it's not a standalone application. Any options to just build the module without running it are greyed out in the Eclipse interface.
How can I either build this module into a .jar for inclusion, or include it in some other way?
Edit: In order to clear the errors in the module after I added it to Eclipse, I followed the instructions in this answer.
You can either convert the whole thing to a library project or simply include the source code in your app's project. To create a library project, you can import the project from github, and after you get it compile, remove any activities, go to the project's Properties->Android and check the 'Is a library' check box. Then add it as a dependency to your own project.

Categories

Resources