library-project

How to use a library project in android studio

99封情书 提交于 2019-11-27 11:29:19
I have been trying to add this library project to my existing project in Android Studio. It's the first time I am going to use a library project and I am having tough time. I have looked around for many ways to do this from tutorials and posts around but couldn't get it done. owe I'm not sure if it's already possible to add a library project via the IDE (-> without any problems). I do this by configuring the gradle files of my project like this: create a folder in your root project directory named libs copy the folder datetimepicker-library to libs add this library in your settings.gradle with

Build variants in Gradle for a Library Project in Android

混江龙づ霸主 提交于 2019-11-27 11:23:11
I am trying to configure with Gradle a project which contains some external libraries. With Gradle I can setup different Environmental Configuration (with a class inside a config file) for the main application using the Build Variants so I can execute code according to this variables. The problem is that how I can do the same for a library project? I created this library for this project and I would like to setup different Build Variants for different scenarios. As an example: In the Library, when running in debug mode, then print all the logs so I can see them while developing. In release

Gradle: add dependency for a specific flavour of the library

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 07:12:53
I have a library project and a application. I'd like to have 2 product flavours ( store , dev ) for both library and application. When I build the store flavour for the application I want to use the store flavour from the library. Also when I build the dev flavour for the application I want to use the dev flavour from the library. I tried setting the same product flavours for both library and application but it does not work. Here is my configuration: Library apply plugin: 'android-library' android { compileSdkVersion 19 buildToolsVersion "19.1.0" defaultConfig { applicationId "ro.amarkovits

Zxing 2.2 import as a library project(not .jar) in eclipse

半腔热情 提交于 2019-11-27 03:41:16
问题 I have downloaded the zxing 2.2 code from the below link https://code.google.com/p/zxing/downloads/list My requirement is to import the "core" project into eclipse and add few code into it. then mark it to be library project. I want to include this library project into barcode scanner sample app and use the barcode scanner app as library from my project. 回答1: Solved prerequisties download latest zxing package. Process 1 create a java project in eclipse.and name it to something like ZxingCore.

Using Activities from Library projects

狂风中的少年 提交于 2019-11-27 01:51:55
问题 I have a Library project set up and a project which depends on this library project - Everything compiles fine and I've had the Dependent project running fine however; I'm have an intermittent problem however while using an Activity from the Library project. My Library project can be "unchecked" as a library project and the "picker" Activity can be run in isolation. Running the Library project in it's own right works fine with no problems. When I use the Library project (and the "picker"

How to Convert an Android Library Project to an External JAR?

谁说胖子不能爱 提交于 2019-11-27 01:49:26
问题 I have an Android library project that has been working for me pretty well, but now I am interested in "converting" it to an external JAR. How do I do that? Can any Android library project be converted to an external JAR? If not, what are the restrictions or limitations? 回答1: Can any Android library project be converted to an external JAR? Not right now. If not, what are the restrictions or limitations? If your library is purely Java code, with no resources, you can create a JAR out of the

how to reference an asset in a library project

烂漫一生 提交于 2019-11-27 00:55:27
In a class belonging to a Library project I call: webview.loadUrl("file:///android_asset/info.html", null); Unfortunately, this only works if I duplicate the file info.html into the Application's project asset folder as well. Is there a way to tell an Android library code: "look for this file in the library's assets folder, not in the application's assets folder" ? kabuko From the Android Docs : Library projects cannot include raw assets The tools do not support the use of raw asset files (saved in the assets/ directory) in a library project. Any asset resources used by an application must be

Getting “Unable to execute dex: Multiple dex files define” error when trying to run main project which is using other library project

馋奶兔 提交于 2019-11-26 17:19:49
问题 I am trying use androidVNC open source project as a Library Project in my MainProject. androidVNC has also used ZoomerWithKeys library project. I want start a activity of androidVNC library project in my MainProject by clicking on a Button. I have done all the basic things like to define all the activity of library project in Manifest of main Project. The problem is that i am getting following error when trying to running my MainProject - Dex Loader] Unable to execute dex: Multiple dex files

Build variants in Gradle for a Library Project in Android

不羁的心 提交于 2019-11-26 15:32:35
问题 I am trying to configure with Gradle a project which contains some external libraries. With Gradle I can setup different Environmental Configuration (with a class inside a config file) for the main application using the Build Variants so I can execute code according to this variables. The problem is that how I can do the same for a library project? I created this library for this project and I would like to setup different Build Variants for different scenarios. As an example: In the Library,

Gradle: add dependency for a specific flavour of the library

末鹿安然 提交于 2019-11-26 13:04:41
问题 I have a library project and a application. I\'d like to have 2 product flavours ( store , dev ) for both library and application. When I build the store flavour for the application I want to use the store flavour from the library. Also when I build the dev flavour for the application I want to use the dev flavour from the library. I tried setting the same product flavours for both library and application but it does not work. Here is my configuration: Library apply plugin: \'android-library\