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

Android - Using a complete application as a library

I developed a complete and working app, from now on called "base-app", which uses different modules and libraries, with a splash screen, activities, fragments and much more... I would like to develop another app (more than one in future) which uses…
userLiuk
  • 83
  • 1
  • 6
0
votes
1 answer

Publishing library to Bintray from Android Studio hangs

I'm following this tutorial to publish an Android library to Bintray. However, the gradlew bintrayUpload task hangs forever without an error message. How can I debug this process?
Ole M.
  • 36
  • 5
0
votes
1 answer

Android AppCompat dependency in custom library

I just created a new library, Powerful Image View. My library is a custom AppCompatImageView, so I need the appcompat-v7 library. And here comes the question: How should I add it to my library? Should I use 'compile', or 'provided' and let the…
Stefano Siano
  • 569
  • 1
  • 4
  • 13
0
votes
1 answer

Displaying raw JSON in a user friendly way

I am trying to create a raw JSON viewer for JSON strings. I understand there are apps that already do this but I am looking to load JSON from my server and display it for an internal tool for my company. I am able to pretty print the JSON values,…
Daiwik Daarun
  • 3,804
  • 7
  • 33
  • 60
0
votes
2 answers

Android library project debugging quickly

I am developing a library project. Right now my debugging process is something like this : Make some changes in library code build it into an aar file use the aar file in main app project as new library module then debug the code changes in lib…
nayakasu
  • 889
  • 1
  • 11
  • 32
0
votes
1 answer

How to implement app indexing with library project?

I'm trying to implement app indexing for one of my apps, but I'm not quite sure what I should return as the appUri for the app indexing Action. Let's say I have a the package name com.example.myapp and the webUri http://example.com/some/path. As I…
0
votes
1 answer

Custom written Class not found when using aar library

I am writing a library. When I include it as a module dependency inside the same project, the app works. If i generate aar file and include it libs folder, I am getting java.lang.NoClassDefFoundError. What is stranger is that the class is written…
Mr.Rao
  • 321
  • 2
  • 6
0
votes
1 answer

How to add activity for result to android-json-form-wizard?

I'm using the Android-Json-Form-Wizard library to construct a form builder; however, specific itens need to startactivityforresult to return back a result as answer for the item. So, I changed the library in some points; therefore, when I used to go…
0
votes
1 answer

Integrate MemorizingTrustManager library in Android Studio Project

I'm stuck trying to add https://github.com/ge0rg/MemorizingTrustManager to my Android Studio project (which consists of one MainActivity only at the moment). I tried the steps in the readme and did some Google research but no success. I just can't…
Jitesh Prajapati
  • 2,533
  • 4
  • 29
  • 51
0
votes
2 answers

Force a user of my library to implement an interface or extend an abstract class

I'm developing an android library (.aar) and I was wondering if it was possible to, as the title suggest, force a user to implement an interface or extend an abstract class of my library. I already know that I could just go with a class like this in…
0
votes
1 answer

TapTargetView not overlaying button

My tap target view is not overlaying the targeted button. My code: new TapTargetSequence(this) .targets( TapTarget.forView(findViewById(R.id.button), "Button 1","This is button 1…
sony
  • 77
  • 1
  • 12
0
votes
0 answers

Android library set configuration values from app

I'm looking at being able to set some configuration variables for my android Library from the app. The library I work with is basically serving data from a REST Api. I have a staging and production server and I would like to give the guys who are…
bottus
  • 883
  • 2
  • 13
  • 32
0
votes
1 answer

how to import Android-DirectoryChooser in android studio

I am trying to use this directory picker: Android-DirectoryChooser. I have tried adding From Maven Central according to instructions but get this error: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed :…
Ali
  • 839
  • 11
  • 21
0
votes
1 answer

Importing a sample from an already imported library in android

In android studios, I have successfully imported a library called ChatKit(https://github.com/stfalcon-studio/ChatKit). The creators of the library were kind enough to include a fully working sample within the library. Instead of recreating the…
shle2821
  • 1,856
  • 1
  • 19
  • 26
0
votes
0 answers

Android Stepview library - attempt to invoke virtual method, Java Null Pointer Error

I am using this library in my android app Android-StepsView, when I tried with the sample code provided by the developer, it works fine, but he has implemented it with a listview, with lots of views, I just need only one in my app, I tied to add it,…