android-library

Why Error:(17, 0) Plugin with id 'com.android.library' not found?

本小妞迷上赌 提交于 2019-12-11 02:04:19
问题 I created a test project and add the library. In the process of implementing it in my project I needed to add a line in build.gradle at module in dependencies , just such a line compile project (':library') And then added to the settings.gradle include ':library', ':app' and build.gradle at Project changed its classpath on classpath 'com.android.tools.build:gradle:1.2.3' and all was good! Once it's working, I tried to implement this library in the main project and carried out the same steps

How to convert IntelliJ android app project into android library project?

。_饼干妹妹 提交于 2019-12-10 23:43:46
问题 I have an android app project that has code, assets, and layouts, that I'd like to make available in other apps. The app project is in IntelliJ IDEA. Question 1) How do I convert this project into an android library project? Question 2) After converting, how do I import the library project into other app projects in IntelliJ? 回答1: Hi Evelyn check the docs: Sharing Android Source Code and Resources Using Library Projects Converting an Application module into a Library module You can convert an

Include external module in Android Library aar

ぃ、小莉子 提交于 2019-12-10 18:45:38
问题 I have a simple enough Android Library build.gradle file (irrelevant parts removed), apply plugin: 'com.android.library' repositories { maven { url 'https://dl.bintray.com/alexeydanilov/maven' } } dependencies { compile 'com.danikula:videocache:1.0.1' } And I would like to be able to build an Android Library .aar which has all the files I want in it, but also all the files which come down from the videocache external module. I've tried many different techniques to try and achieve this

Android: How to manage common codebase in multiple libraries used by the same application

醉酒当歌 提交于 2019-12-10 16:17:21
问题 NOTE: This question is based on the answers I received in the following discussion: Android: 2 aar libraries with the same package In my android projects, I'm trying to support multiple versions of a common codebase used throughout different aar libraries which supposed to compile together on my app. I currently make copies of the classes in the common codebase, changing their package name and put them in every library I create. In the short term, it allows every library to compile with a

Building System App With Prebuilt .so Library

和自甴很熟 提交于 2019-12-10 16:04:58
问题 I've been stuck here for a week trying to build a 3rd party .so library along with my app into custom Android system. I followed http://www.maxters.net/2012/05/adding-prebuilt-shared-library-to-android-build-system/ and successfully add the .so lib as prebuilt shared library to Android Build System. Now I can see the .so lib at ../out/target/product/crespo4g/obj/lib/. But the libraries in this directory are not going to be migrated to device when flashing. And my .so lib is not appeared at

Library based application installs 2 APK files, not one - Why?

為{幸葍}努か 提交于 2019-12-10 16:02:12
问题 I am trying to restructure an existing app so that, except for a few override-able methods in a derived activity, all code will reside in a library. This still doesn't work for some reason, but in the process of attempting to troubleshoot this, I discovered much to my dismay that there are two .apk files installed, not one (when I run a debug session from eclipse): The first (and larger file) is having the original library name. The second (only 20KB in size) is having the derived application

To check or not to check “IsLibrary”?

浪尽此生 提交于 2019-12-10 15:38:10
问题 I built my app using a library project (that I also created, to be reused in other apps). It builds fine, but when I try to install & run it through Eclipse (Ctrl+F11), I get this red Could not find MyLib.apk! error line in my console: Console output: [2013-11-30 14:42:59 - MyApp] ------------------------------ [2013-11-30 14:42:59 - MyApp] Android Launch! [2013-11-30 14:42:59 - MyApp] adb is running normally. [2013-11-30 14:42:59 - MyApp] Performing com.sfinja.myapp.ActivitySubClass activity

accidentally removed android dependencies folder

百般思念 提交于 2019-12-10 13:29:15
问题 I accidentally removed the library: "android dependencies". Is there a way to retrieve it or import/download? A person suggested me to "go to source and say order import export for all libraries you need except the android defualt libs.." but I don't understand exactly what it means. Any advice would be greatly appreciated! 回答1: Look at project.properties file. You will see android sdk version(Example : target=android-4) which you used. And then Project -> Right Click -> Java Build Path ->

Android: 2 aar libraries with the same package

限于喜欢 提交于 2019-12-10 12:39:40
问题 Edit: A follow-up question based on this discussion was published in the following link. Android: How to manage common codebase in multiple libraries used by the same application I have two android aar library projects: LibA using ClassA, and LibB using ClassB. Both libs have the same base package. both libs use the same class named BaseClass, currently resides separately within each lib in package name 'common'. BaseClass contains one method named baseMethod. This creates two libs using a

Send plain text from an Android library to an Android project

冷暖自知 提交于 2019-12-10 11:28:29
问题 I am trying to send some text from my library to the project android. They are connected, i can start an intent from the project but i dont understand how to send data from library to the main project. My question: is it possible? Thank you. 回答1: You could achieve this communication with the aid of interfaces. The idea is to crate a callback method that will be implemented in your activity, and will be called by the project library to send text back to you (in android project). For example,