android-library

How to Remove Duplicate Libraries added via gradle?

邮差的信 提交于 2019-12-10 10:43:50
问题 I am using two libraries in my project. One is this and the other is this. Whenever I run the App with Edit Test library it shows UNEXPECTED TOP-LEVEL EXCEPTION : Error:Execution failed for task ':mobile:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: E:\Android\me\me\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Project\RemoteiT\RemoteiT\mobile\build\intermediates\dex\debug --input-list=C:\Project\RemoteiT\RemoteiT\mobile\build

Adding Google-Play-Services to library project

喜你入骨 提交于 2019-12-10 09:42:58
问题 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

Dalvik is looking for .so file with '.0' extension - why?

江枫思渺然 提交于 2019-12-10 03:41:50
问题 I have started developing a very simple Android application that consists of three parts: the Java application itself a pre-built shared library (we'll call it libfoo ) another shared library that uses the pre-built library (we'll call it libfoowrapper ) The file system looks something like this: jni Android.mk libfoo.so foowrapper.c The Android.mk file contains the following contents: LOCAL_PATH := $(call my-dir) #============================== include $(CLEAR_VARS) LOCAL_MODULE := foo

Add an android library to the default list of libraries in Studio/SDK

筅森魡賤 提交于 2019-12-10 01:48:21
问题 So first of all, just to clear any doubts, i know how to add a library to an android project. My question here is that, i want to add a library to the list of default libraries in my android studio. Let me explain with an example. Let's say i want to add the Glide library to my project. To do that firstly, i have to go to glide github page and then, from there i copy the compile 'com.github.bumptech.glide:glide:3.7.0' text and paste in in my build.gradle file . Then the android studio would

Android Studio: How to link my .aar library to multiple projects?

给你一囗甜甜゛ 提交于 2019-12-09 22:34:55
问题 I have a library that I use in multiple projects. Every time I update (and rebuild) this library, I do not want to have to copy and paste the .aar to EVERY single project that uses this library. What is the most convenient, efficient way to accomplish this? Note: I'm running Android Studio 1.0 RC2 on Mac OSX. 回答1: Upload your android library as an artifact to maven central or jcenter. Checkout this guide that i totally find worth mentioning here to understand how to upload your android

How to exclude a jar-file from my Android library build target

落爺英雄遲暮 提交于 2019-12-09 13:30:28
问题 I am using Android Studio and have a several apps that rely on the same code. I moved shared code to a separate library in order to include it in my apps. The library project ( MyLib ) that I created for this purpose requires a jar-file to compile, so I added it to project's libs directory. My build.gradle of MyLib main module looks like this: apply plugin: 'com.android.library' android { compileSdkVersion 21 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.example.android"

How do I add a new library to android dependencies using eclipse adt?

故事扮演 提交于 2019-12-09 11:00:58
问题 I am trying to add external library to android dependancies using eclipse adt. I have a couple of libraries like pull to refresh etc in there. But everytime I add a new library jar file it shows outside of the android dependancies library folder. How do I make it such that it is coupled with the other libraries as a part of android dependancies library. Here's what I did so far: Project> Properties> java build path > libraries> add jars ( also tried adding external jars), but it always showed

How to include dependencies in android library gradle project?

纵饮孤独 提交于 2019-12-09 04:44:45
问题 I'm building an android library project with Gradle using Android Studio. It has some local dependencies: compile project(':androidlibrary') with nested, additional external dependencies: compile group: 'com.google.guava', name: 'guava', version: '14.0.1' I managed to build the aar file but no external or local dependencies are included. I expect external dependencies to be mentioned in the POM file when published to maven, but what about the local ones? What is the right way to build such

How to reference an icon from a Library Project in Application's AndroidManifest.xml

我与影子孤独终老i 提交于 2019-12-08 17:38:21
问题 I am trying to use the same application icon for all applications derived from a Library Project. I thought that it would be as simple as implementing the advice provided in this thread, but unfortunately it doesn't work. What I did is add to the <manifest> tag in the application's AndroidManifest.xml the following line: xmlns:mylib="http://schemas.android.com/apk/res/com.example.baseapp" And a few lines down the same AndroidManifest.xml file, change the typical @drawable/icon to:

Reducing size of apk through libraries

岁酱吖の 提交于 2019-12-08 13:31:20
问题 I want to decrease the size of apk.I have already used Lint and Proguard to remove unused resources and reduce size.Now i am looking at libraries like ButterKnife which can reduce the lines of code.Are their any other good libraries which can help in minimizing lines of code and hence help in reducing size of apk? 回答1: There is a huge list of libraries available which can reduce the line of codes for common operations you perform in Android: Retrofit 1.9.0 : for REST API calls Event Bus 2.4.0