Questions tagged [android-library]

An Android library project is a development project that holds shared Android source code and resources. Other Android application projects can reference the library project and, at build time, include its compiled sources in their .apk files.

An Android library project is a development project that holds everything needed to build an app, including source code, resource files, and an Android manifest. However, instead of compiling into an APK that runs on a device, an Android library compiles into an Android Archive (AAR) file that can be used as a dependency for an Android app module.

Android Team started revamping the whole design of Android library project since SDK r14 and is going to move from source-based mechanism to compiled-code based library mechanism, in order to support distributing Android library project as a single self-contained jar file. More details in their official blog.

A library module is useful in the following situations:

  • When you're building multiple apps that use some of the same components, such as activities, services, or UI layouts.
  • When you're building an app that exists in multiple APK variations, such as a free and paid version and you need the same core components in both.

Useful links

1883 questions
0
votes
2 answers

Unable to use the dependencies in the arr file after importing in the application

I am trying to create a library, that uses recyclerview, and then importing that library ie., arr file to an application project. Changes i did in the library's gradle file are apply plugin: 'com.android.library' removed the applicationId And then…
Jagannath
  • 31
  • 2
0
votes
1 answer

Android com.github.lzyzsd.circleprogress.DonutProgress DonutProgress.setFinishedStrokeColor(int color) not working?

I'm using this library : https://github.com/lzyzsd/CircleProgress for my UI. I'd like to know if it's possible to change the finished_color programatically. I'm having trouble doing it : Using donutProgress.setFinishedStrokeColor(R.color.orange); or…
Maxime Flament
  • 721
  • 1
  • 7
  • 24
0
votes
2 answers

How to import an Android Library Project created on Android Studio into existing Eclipse Android App Project, as library?

What I want to do is to add this GitHub - Custom-Calendar-View Android Library Project created on Android Studio. I read a lot of questions and answers about, on SO, but none fits my case. How can to this? Need to export a .jar from Android Library…
Universe
  • 1,527
  • 1
  • 15
  • 22
0
votes
1 answer

An IllegalStateException got with "setFragmentManager(getSupportFragmentManager)" with library : com.veinhorn.scrollggalleryview"

I'm using com.veinhorn.scrollgalleryview to show user some pic to select...but...I'm getting an IllegalStateException when calling setFragmentManager(FragmentManager manager of the ScrollGalleryView class... Here is a part of my code :…
Mesabloo
  • 337
  • 4
  • 13
0
votes
0 answers

Uploading android library to jCenter bintray

Getting this issue No service of type Factory available in ProjectScopeServices when I am building library Project build.gradle dependencies { classpath 'com.android.tools.build:gradle:2.2.0-beta1' classpath…
dastan
  • 892
  • 10
  • 17
0
votes
1 answer

Android enable warning for custom library if new version is available

With the support libraries, for example, Android Lint will show a warning if the library is not using the latest version. However, when I created my own library and published it through Bintray, no warning is displayed when using an older version.…
Sean
  • 445
  • 1
  • 5
  • 10
0
votes
0 answers

How can I handle both kinds of SearchView in my library?

Situation I'm building a library which will facilitate the construction of Instant Search interfaces on Android. This library manipulates SearchViews and other UI elements to link them together and handles their state. Consequently, I have some…
PLNech
  • 3,087
  • 1
  • 23
  • 52
0
votes
1 answer

Return a list of component ID's from an activity in android?

I am putting together a small android library to be used by other developers in their android apps. The 3rd party developer will add my custom button e.g."com.example.myLibrary.CustomButton" into their xml views. The developer can put as many of…
0
votes
1 answer

Create dependency of my library android

How can I create compile 'xxx-v1.0.0' for my library that could be used directly in build gradle in android studios
Aakash
  • 151
  • 9
0
votes
1 answer

start a service in android-aar module from the project

I implemented an aar file which contains a BLE scanning service. The service uses another aar library. When I try to start the service which is in the aar module. i am getting the following error. java.lang.NoClassDefFoundError:…
varghesekutty
  • 997
  • 2
  • 11
  • 23
0
votes
2 answers

how to call an activity from a library android

I'm trying to call an activity that is in the main project from a library Library code Intent in = new Intent(this, com.process.agenda.activity.MainActivity.class); startActivity(in); Error:Circular reference between projects: :app ->…
0
votes
1 answer

Create CouchDb Document with Volley

Hello I try to create a Document in CouchDb using Volley but I have Problems with both the POST and PUT Method. String url = "http://serverurl:port/database/"; StringRequest request = new StringRequest(Request.Method.POST , url, new…
0
votes
1 answer

Where does an Android Library compile to?

This is probably a stupid question, but I've tried searching both on StackOverflow and on my file system, and I can't find it. I have an Android Library project. When I compile the project, where does the compiled library go? Or is there something…
CaptainForge
  • 1,365
  • 7
  • 21
  • 46
0
votes
2 answers

Sinch issue java.lang.UnsatisfiedLinkError

I getting Bellow Errors in Sinch. its issue in some Device. Process: com.reach.communications, PID: 14029 java.lang.UnsatisfiedLinkError:…
Android Devs
  • 125
  • 13
0
votes
1 answer

Android - avoiding parallel run of same service within multiple apps

Little background: I am developing library which uses one background service. There is a hight probability that there will be 2 or more apps implementing the library on the same android phone. Q: Is there any solution to prevent this background…
1 2 3
99
100