android-library

Android Gradle Manifest merger failed

China☆狼群 提交于 2019-12-18 08:52:10
问题 I use the leanback library to develop for Android TV. My app declare the min API to 16 however the leanback as a minimum API of 16. So as the documentation says I declared this in my manifest : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.mypackage.package"> <uses-sdk tools:overrideLibrary="android.support.v17.leanback" /> However I still have the error : Error:(6, 5)

Include Firebase Analytics in library

烈酒焚心 提交于 2019-12-18 07:48:08
问题 I have multiple Android apps that all include a custom library. This library is the core of the apps, and each app just contains a main activity extending an activity from the library to decide which flavour the specific app has. I now want to include Firebase Analytics in the whole app, including the library, but I cannot wrap my head around how to. The google-services.json file should be different for each app, but I can not include the google-services plugin without a google-services file

How to Get Package Name of Source Class File in Android ?

北战南征 提交于 2019-12-18 04:42:30
问题 I am using only one project to port lite and full versions for that I am just updating Manifest file package names. My project structure is like this My App       |_src           |_com.example.myapp                                               |_MyClass.java and my Manifest package name is different. package="com.example.myapplite" I am using one library project in that I want package names of classes that I am using in MyApp. I have used this System.out.println("Package Name " + context

android library project and Activities

孤街醉人 提交于 2019-12-17 22:22:58
问题 I'm developing an Android SDK library. In this library I've declared and used some Activities. Now I've tried to include the library in an application but I've noticed that I must declare all the library activities in the app. This is a very bad thing because in the library, I've included a lot of activities and the developer has to copy all the activities in his own app. Is there a solutions to this? 回答1: No, this is a known limitation of the libraries at the moment. There is a lot of

Is it possible to get application's context in an Android Library Project?

杀马特。学长 韩版系。学妹 提交于 2019-12-17 15:35:31
问题 I would like to get the context of application which has reference/hosted my library at run-time inside one class of my library project. Is it possible? If yes, how? Thanks Update I don't want my user to pass context in parameter to my library project because it is possible that my library project will be called through JNI and I have no idea how I can get context in JNI and pass it to Java layer. 回答1: Is it possible? Yes. If yes, how? Pass it in as a parameter. I don't want my user to pass

Can't find import module option in project structure (Android Studio 0.3.4 - 0.5.2)

醉酒当歌 提交于 2019-12-17 15:33:02
问题 I'm getting really confused and frustrated because I just can't understand how to import my android library project as dependency for my application project. I tried to find online and most of the answers suggested to go to project structure of my application and click on '+' and then click on 'import module' But Android Studio 0.3.4 - 0.5.2 doesn't show any options and when I click on '+', it just shows the windows for a new module. Am I doing something wrong or what ? Help!!! 回答1: You'll

NoClassDefFoundError on external library project for Android

℡╲_俬逩灬. 提交于 2019-12-17 06:47:07
问题 I use eclipse for Google Android development. I've created a library project ( [x] Is Library in the Android-settings), which includes an external jar-file (Referenced Libraries). This library project are referenced in another Project (the actual project which will use the library project). This is done by add the project under the Android-settings. the source compiles but if I want to execute it on the device, I get the NoClassDefFoundError for a class which is inside the jar-file which is

Android support multidex library implementation

…衆ロ難τιáo~ 提交于 2019-12-17 06:46:50
问题 I have hit the magic dex limit because my application uses a lot of jars (drive API, greendao, text to pdf, support.. ). My current solution was that I literally created a second apk just for google drive which I called from the main apk. But now I found out that android finally supports this with this library. My problem is just that I don't know how to implement it(preferably without gradle). I can't find any good tutorials for it. Okey I am losing my mind trying to implement this... I have

Android support multidex library implementation

送分小仙女□ 提交于 2019-12-17 06:46:06
问题 I have hit the magic dex limit because my application uses a lot of jars (drive API, greendao, text to pdf, support.. ). My current solution was that I literally created a second apk just for google drive which I called from the main apk. But now I found out that android finally supports this with this library. My problem is just that I don't know how to implement it(preferably without gradle). I can't find any good tutorials for it. Okey I am losing my mind trying to implement this... I have

How to make Proguard ignore external libraries?

断了今生、忘了曾经 提交于 2019-12-17 06:38:40
问题 I want to use Proguard mainly for obfuscation reasons. My problem is that I have three libraries, Twitter4J and two signpost libraries. These libraries caused errors when I tried to create an signed APK. To get over this I put the following in the proguard.config file... -dontwarn org.apache.commons.codec.binary.** -dontwarn org.slf4j.** -dontwarn com.sun.syndication.io.** -dontwarn com.sun.syndication.feed.synd.* While this got rid of the errors in the console, when i loaded my signed APK