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
4
votes
1 answer

Add a project dependency to another project in Android studio

I have a existing project say A which has dependencies over a few projects. Now I want to make this project A as a library project for Project B. What I have done so far is in the build.gradle of Project A, I have changed the plugin from…
Saraschandraa
  • 478
  • 1
  • 10
  • 28
4
votes
0 answers

How to ignore launchers of AndroidManifest.xml of a library project

I have two Android projects A and B. A uses B as a reference project, and B might be a standalone project or a library project for A. So A's manifest has a launcher and so does B's. When building project A, "manifestmerger.enabled=true" is used to…
4
votes
2 answers

How to reuse the .cs file from other projects

I have been working on Android app Development and now have switched to windows. 1) I have a scenario where i need to create a child project and library project, we have done this Android as given in the link -…
Goofy
  • 6,098
  • 17
  • 90
  • 156
4
votes
2 answers

Import module to gradle project on android studio 0.4.0v

I need to import a library project as a module to an existing project. Please Note! There are answers to questions like that, All answers regarding older versions of Android-Studio. In older versions you could follow these steps: Open a project…
David
  • 37,109
  • 32
  • 120
  • 141
4
votes
2 answers

"Library projects" in iOS

Some time ago I created and Android app. Then I needed to create very similar app (functionality-wise) with some cosmetic, branding and small-scale functionality changes. I refactored the original app as a library project, created an app that used…
Aleks G
  • 56,435
  • 29
  • 168
  • 265
4
votes
1 answer

To check or not to check "IsLibrary"?

I built my app using a library project (that I also created, to be reused in other apps). It builds fine, but when I try to install & run it through Eclipse (Ctrl+F11), I get this red Could not find MyLib.apk! error line in my console: Console…
sfinja
  • 400
  • 4
  • 11
4
votes
1 answer

How to run unit tests for Xamarin library projects (iOS and Android)?

I'm creating a component for the Xamarin Component Store, providing a Library for Android and iOS. I've put NUnit tests into both library projects but I can't run the unit tests. Is it possible to execute tests in a Android/iOS library project?
Rodja
  • 7,998
  • 8
  • 48
  • 55
4
votes
2 answers

Library already added: Gradle Build

I've just updated my project with the new gradle build system. After trying it several times i failed always with the same issue. I have a project with many sub-library-projects. Those use the support-library-v4 and my main project uses it…
mikepenz
  • 12,708
  • 14
  • 77
  • 117
4
votes
3 answers

How to build Android project with Ant that depends on Java project?

I have an Android Library project, AndroidLib, that depends on a Java project in my workspace, JavaLib. In Eclipse this is done by adding the JavaLib project to Java Build Path > Projects for AndroidLib and setting it to be exported in the Order and…
Joseph Earl
  • 23,351
  • 11
  • 76
  • 89
4
votes
1 answer

How to build jar for Android library project in Intellij Idea without unnecessary content

When I build jar for Android library project in Intellij Idea it puts inside all dependent jar that I use in the project and classes.jar but as I think all that stuff is unnecessary and jar can contain only compiled classes e.g. Is that possible…
olegflo
  • 1,105
  • 3
  • 17
  • 26
4
votes
3 answers

Calling an Application Activity from a Library Project in Android

Ok, So I'm making a library project of UI elements. The Library has some activities which are based of ActionBarSherlock which is a backwards compatibility library for the action bar in android. In these activities I would like to have a button in…
4
votes
1 answer

Android Library Projects: Refactoring and Navigation

Currently (it changed quite a bit over time) Android Library projects become jar files in the referencing project. There are some issues with this approach: namely refactoring and navigation through code. Is there any way to refactor the library…
Markus Junginger
  • 6,950
  • 31
  • 52
3
votes
2 answers

How to Reverse Dependency for Class Factory moved to a Library

The following code works very well when all involved classes are in the same project (determineSubClass is a member of BaseClass): protected static BaseClass determineSubClass(String p1, int p2, Boolean p3) { BaseClass baseObj = null; if (…
3
votes
1 answer

Application using LVL installs TWO icons

The dual-icon saga continues... It turns out that while this answer may be true for the debug version (yes, I still manage to display only one icon when installing the APK via Eclipse when debugging), it doesn't seem to work for the exported…
an00b
  • 11,338
  • 13
  • 64
  • 101
3
votes
1 answer

Android - Common style resources when using library projects?

I am making some shared libs that are common to several projects i am doing. Problem is that when it comes to XML, the library project's XML is not included in the main project. At the moment i am doing everything programmatically which is obviously…
Dan Harvey
  • 798
  • 1
  • 10
  • 23
1 2
3
12 13