Questions tagged [library-project]

A project that will be compiled as a library

A project that will be compiled as a library.

In Android:

A library project is a standard Android project, so you can create a new one in the same way as you would a new application project.

To create a new library project:

1 - Select File > New > Project.
2 - Select Android > Android Application Project, and click Next.
3 - Enter the basic settings for the project, including Application Name, Project Name, Package Name, and SDK settings.
4 - In the Configure Project page, select the Mark this project as a library option to flag the project as a library.
5 - Set the other options as desired and click Next.
6 - Follow the instructions to complete the wizard and create a new library project.

You can also convert an existing application project into a library. To do so, simply open the Properties for the project and select the is Library checkbox

182 questions
8
votes
3 answers

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"…
an00b
  • 11,338
  • 13
  • 64
  • 101
7
votes
3 answers

Updated SDK Tools and ADT to 17 and now getting VerifyErrors

I have a project that references two library projects. After upgrading the ADT and SDK tools to version 17, the app crashes as soon as it hits a reference to a class defined in one of the Library projects. Errors such as: Unable to resolve…
cottonBallPaws
  • 21,220
  • 37
  • 123
  • 171
7
votes
2 answers

How to reference an icon from a Library Project in Application's AndroidManifest.xml

I am trying to use the same application icon for all applications derived from a Library Project. I thought that it would be as simple as implementing the advice provided in this thread, but unfortunately it doesn't work. What I did is add to the…
an00b
  • 11,338
  • 13
  • 64
  • 101
7
votes
2 answers

aar vs "plain module" advantages

if I have a project with many library projects linked, could I improve build performances by packaging each of them in an AAR and including it in the main project ? Or this will not make any difference since that when the compiler need to assemble…
Apperside
  • 3,542
  • 2
  • 38
  • 65
6
votes
1 answer

Why can't a .aidl be placed into a library project?

I came across a comment this answer which states that a library project: cannot hold .aidl files, cannot depend on another library project, cannot hold assets Well, that comment was made about a year and a half ago, and I can tell you with…
Bill The Ape
  • 3,261
  • 25
  • 44
6
votes
1 answer

In Eclipse, how can I quickly access the source of an "android library project" from the source of a project that uses it?

Project A is an android library project in my workspace(via project properties->android->library: is library). Project A declares classA. Project B uses project A (via project properties->android->library: add...). Project B instantiates classA.…
mamuso
  • 3,117
  • 3
  • 30
  • 32
5
votes
6 answers

How to include jar files in android library project

I am trying to use phonegap inside an android library project. The library project compiles just fine but when i try to start an activity that extends DroidGap, i get this error 01-02 10:12:17.575: W/dalvikvm(316): Unable to resolve superclass of…
Ashok
  • 227
  • 4
  • 10
5
votes
1 answer

Android aar file dependencies not found in used project

I created library project and used some dependencies.Then i build 'aar' file and import it in to a new project as a new module. The issue is dependencies of aar project are not imported in to the new project environment? Do you have any idea?
5
votes
2 answers

Distinct communication from Android Library Project to App using it

Can anyone tell me a good approach to communicate from an Android Library Project to the App which uses this Library? A little description: my library receives GCM notifications and forwards some of them to the App using this library. Right now I…
Stefan Medack
  • 2,731
  • 26
  • 32
5
votes
1 answer

Android Library AAR depending on another library

Hi I have a Android Library Project which produces an AAR. All is good but when I use the AAR in another project I get this error: java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso The AAR makes use of picasso, is it possible to export…
redDragonzz
  • 1,543
  • 2
  • 15
  • 33
5
votes
2 answers

'aapt' error. Pre Compiler Build aborted

I'm using Eclipse 4.2.2 with Android SDK 22.0.1 to construct an Android application which uses the Facebook and Google Play Services lib. However I'm stuck with a problem: every time I include one or both of the library the aapt verbose mode crash…
nigonzalezm
  • 190
  • 2
  • 10
4
votes
2 answers

How do I get a reference to IWebHostEnvironment inside a library project? (Also inside static class :()

I need to use Server.MapPath. Since library projects does not have Startup.cs i cannot apply the normal way.
heimzza
  • 276
  • 4
  • 12
4
votes
3 answers

proguard.cfg not working in exported application using LIBRARY

I have two versions of the same application using identical proguard.cfg with the following section aimed at squelching all Log.x() LogCat output: -assumenosideeffects class android.util.Log { public static *** v(...); public static ***…
an00b
  • 11,338
  • 13
  • 64
  • 101
4
votes
1 answer

Library based application installs 2 APK files, not one - Why?

I am trying to restructure an existing app so that, except for a few override-able methods in a derived activity, all code will reside in a library. This still doesn't work for some reason, but in the process of attempting to troubleshoot this, I…
an00b
  • 11,338
  • 13
  • 64
  • 101
4
votes
2 answers

After extracting code to lib widget is no longer working

I had a perfectly working widget as part of my project. Then I decided to extract common code (including the widget) into the library project. After doing this everything works except the widget. It appears in the list of widgets available for…
Bostone
  • 36,858
  • 39
  • 167
  • 227
1
2
3
12 13