library-project

Android Library AAR depending on another library

…衆ロ難τιáo~ 提交于 2019-12-18 08:50:12
问题 Hi I have a Android Library Project which produces an AAR. All is good but when I use the AAR in another project I get this error: java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso The AAR makes use of picasso, is it possible to export the dependencies of the AAR as well when generating one? 回答1: How can one go about setting up a local maven repo. WARNING: the following recipe works, but probably could use improvement, as I am far from a Maven expert. I hammered out this approach

Replace Android library project by JAR library?

匆匆过客 提交于 2019-12-14 00:40:18
问题 In my project, there are many library project (more than 10). It takes long time to build. So I want to replace some of these library projects by JAR libraries. According to this question: How to Convert an Android Library Project to an External JAR? As CommonsWare's answer (https://stackoverflow.com/a/7973950/190309) If your library is purely Java code, with no resources, you can create a JAR out of the .class files, just as you would with regular Java. But when using NineOldAndroids library

Import Android “Gridlayout library project” directly into my project

梦想与她 提交于 2019-12-13 04:47:40
问题 i already found out how to use the Gridlayout for Android 4.0 Devices. I downloaded the support library, imported it as a library project and then i referenced it as a library in my own project. But i want to have the library directly in my own project. I already copied the files of the libs folder in my own libs folder. And i also copied the attrs.xml and dimens.xml into my own project. Then i added both jar files to my build-path. Eclipse itself gives me no error, but the Android layout

How to build jar for Android library project in Intellij Idea without unnecessary content

◇◆丶佛笑我妖孽 提交于 2019-12-12 12:28:35
问题 When I build jar for Android library project in Intellij Idea it puts inside all dependent jar that I use in the project and classes.jar but as I think all that stuff is unnecessary and jar can contain only compiled classes e.g. Is that possible to compile clean jar in Idea? or should I use ant or something else? 回答1: You cloud compile the project using intelliJ, then locate the class files, the go to their root folder, then its parent folder and use jar cvf foo.jar -R <root>/ in a shell. 来源:

How to refer to a resource not in the Library Project, but only in the dependent Application Project?

谁说胖子不能爱 提交于 2019-12-11 09:08:41
问题 I'm turning my one app into several similar apps and using a base library project. I want to load a video that will be in res/raw/welcome.m4a in the dependent applications. This is how is was being done before using the library project: vv.setVideoURI(Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.welcome)); This produces an error in my library project, because res/raw/welcome.m4v doesn't exist, it will only be in the App Project res/ folder, and will be different for each app. My

How to convert Library project into jar

夙愿已清 提交于 2019-12-11 04:22:34
问题 Could any one please tell me the steps to convert the library project into jar. 回答1: in eclipse select your library project 1:right click on project 2: select export 3:java then jar 回答2: Rightclick on Project>export>Java>jarfile select the files and your jar ready. Be sure that library project files doesnt conflict other project file. ex Manifest.xml your library manifest may contains activity which is already in project(your jar added) manifest. 回答3: Project>export>Java>jarfile remove

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

Issue with using .AAR file in other project

ぐ巨炮叔叔 提交于 2019-12-10 10:24:25
问题 I have to use my android library project (which has resources), in another project. Here is what I did so far: Created a library project in Android Studio. Build that project, so .aar file was generated like: ..\MyApplication\mylibrary\build\outputs\aar\mylibrary-debug.aar Created a new Android project in Android Studio. Then, I followed this: File >> New Module >> Import .JAR or .AAR package This gives me following structure in my project: There was no any error in gradle sync or while I

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: