android-library

How to include an Android library module in another library?

我只是一个虾纸丫 提交于 2019-12-06 18:39:32
问题 I am building an Android library that is packaged as an aar and distributed to 3rd party developers. The structure is pretty simple: project ---libraryA ---libraryB libraryA requires libraryB, which is why is has this in its gradle file: compile project(':libraryB') And settings.gradle has include ':libraryB', ':libraryA' But if I build the project as an aar it only includes libraryA. What am I missing? I read the responses to this: Android Studio how to package single AAR from multiple

How to include a dependency inside an Android library?

懵懂的女人 提交于 2019-12-06 15:13:11
Currently i'm writing a library for android that needs Volley to function. Currently, the Volley dependency is declared in both the dependencies block for the library and whatever app uses the library. What do I need to do so that my Library can pull in its needed dependencies itself, instead of having the implementing app also declaring the dependency? Gradle supports transitive dependencies. For a local library, this works like this: compile(project(:LIBRARY_NAME)) { transitive=true } For remote libraries: compile ('com.somepackage:LIBRARY_NAME:1.0.0'){ transitive=true //default, normally no

Receive Push Notifications into library project

梦想与她 提交于 2019-12-06 14:26:17
问题 I have one project as a library to export to lite version of my project. In the library project, I have implemented push notifications. I've runthe library project as a normal project and the push notification work fine. My problem happens when i am importing this project as a library in lite version project.The push notification failed. Here is my GCMIntentService class: public class GCMIntentService extends GCMBaseIntentService { public static final String SENDER_ID = "206703456431"; public

android : how to start activity defined in library project

南楼画角 提交于 2019-12-06 07:22:57
问题 I am developing an android application that uses androidVNC Viewer as a library project, but I am unable to launch an activity from androidVNC (activity not found exception). Also, how do I bundle a library project and use it as one apk? UPDATE I am using following intent to call: Intent call= new Intent("android.androidVNC.androidVNC.LAUNCH"); startActivity(call); UPDATE 2 after using following code i think i could start the activity but getting this ( java.lang.NoSuchFieldError: android

Android - Include GitHub Library ActionBar PullToRefresh

牧云@^-^@ 提交于 2019-12-06 07:06:59
问题 i have a problem with including a library from GitHub. This is the library: https://github.com/chrisbanes/ActionBar-PullToRefresh I've downloaded this and then went in eclipse to "Import"->"Existing projects into workspace" and then selected the downloaded directory. But i get the error: "no projects are found to import". 回答1: When you click on import you should then click on the "Android" folder, then "Existing Android Projects into Workspace." It seems you are using "Existing Project into

How can I use filter for emma when building Android test with ant for a library project?

▼魔方 西西 提交于 2019-12-06 05:42:10
问题 From this question : How can I use filter for emma when building Android test with ant? I know emma can use a filter by adding the following lines to my ant.properties of the targeted project, not the test project, emma.filter=-com.your.excluded.package.* but it seems it doesn't work properly if my target project is a library project. My workspace looks like this: projectlib1 : lib project using lib2 projectlib1/tests : unit tests for lib1 projectlib2 : lib project using lib3 projectlib2

Override Activity from Android Library project

白昼怎懂夜的黑 提交于 2019-12-06 05:03:00
问题 I have an Android project. Now I need to create a second edition of that project. What will differ: New edition of the Project should have different content in one of the Activities. I was thinking about creating a library project and two new projects( project1 and project2 ) which will use library project, but I don't really understand how to setup this. Should I just convert the original project into library, then create two new projects and then what ? How to make project1 use activity1

Adding Google-Play-Services to library project

删除回忆录丶 提交于 2019-12-06 01:41:41
I'm working on a map library and I'm using Google-Play-Services. So Far so good. Problem is this: I include Google-Play-Services library project in my map library (using: properties -> android -> add library). Tested it using a client within the library (Unchcecking the library checkbox and launching a mainActivity) and works fine! When I include my map library in a sample client project, this client project won't have access to Google Play Services, why? If I include Google play services in the client project, I get: [2013-07-18 08:40:04 - Dex Loader] Unable to execute dex: Multiple dex files

How to reference dependencies packages into an Android Library like .aar file?

偶尔善良 提交于 2019-12-06 00:43:34
问题 I have an android-library plugin that uses several android libraries included as .jar files and referenced directly from my build.gradle file : compile fileTree(dir: 'libs', include: '*.jar') I would then issue a gradlew assembleRelease command to create a .aar file that would be usable within an android application. This has always been working well for me up to now. I now need to use the Google Play Services in my android-library. As it is instructed in the official Android documentation

Android Studio builds two applications for the same project simultaenously

本小妞迷上赌 提交于 2019-12-06 00:30:57
I'm making an app using Android Studio v0.5.9, which has a library project as a dependency. But, every time I run the project two apks having the same name and icon, are deployed to my device. The first apk(app) contains my main module, whereas, the second one is the library project itself. However, when I run the same project from Eclipse, only one apk is deployed and it works perfectly. Here are some screenshots of the problem - First App(My module) - Second App(library project) - top-level build.gradle file - buildscript { repositories { mavenCentral() } dependencies { classpath 'com