android-library

Transitive Library dependencies are not found in the application

跟風遠走 提交于 2020-01-11 07:34:21
问题 Say I have a library module which contains some 3rd party libraries like OkHttp. When I include this library in my application I was unable to use these 3rd party libraries. I read the following articles Article 1, Article 2 and tried 1. compile project(':library-name') {after importing the .aar file(of library) as a module into myproject} 2. I included the .aar file in libs folder and added following dependencies build.gradle(project level) allprojects { repositories { flatDir { dirs 'libs'

Can't find resource identifiers from AAR in XML

核能气质少年 提交于 2020-01-09 11:13:35
问题 I developed a custom Preference for an application. It has two custom attributes. I'm trying to move the Preference to a library project to reuse in other projects. I moved the Java file along with the corresponding layout and attr XML files. Here's the attr file in the library project: <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="NumberPickerPreference" > <attr name="minValue" format="integer" /> <attr name="maxValue" format="integer" /> </declare-styleable> <

Can't find resource identifiers from AAR in XML

懵懂的女人 提交于 2020-01-09 11:11:50
问题 I developed a custom Preference for an application. It has two custom attributes. I'm trying to move the Preference to a library project to reuse in other projects. I moved the Java file along with the corresponding layout and attr XML files. Here's the attr file in the library project: <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="NumberPickerPreference" > <attr name="minValue" format="integer" /> <attr name="maxValue" format="integer" /> </declare-styleable> <

implementation project ':app' in 'libModule' not working

折月煮酒 提交于 2020-01-05 09:35:16
问题 I need to create module in Android Studio which will contain dependency on the main project. I create new project and module, add implementation to library gradle like next: implementation project(':app') but when I try to sync gradle, I got next errors: Unable to resolve dependency for ':mylibrary@debug/compileClasspath': Could not resolve project :app. Unable to resolve dependency for ':mylibrary@debugAndroidTest/compileClasspath': Could not resolve project :app. Unable to resolve

Unable to Set Text Size Using FlowTextView

做~自己de王妃 提交于 2020-01-05 05:44:08
问题 I found a library which allows an app to wrap text around an image - however once implemented it changed the size of my text - how can the text size be increase when using this library? android:textSize= has no impact on the text size. Neither does: FlowTextView titleTv = (FlowTextView) findViewById(R.id.titleTv); ((FlowTextView) findViewById(R.id.titleTv)).setTextSize(20); https://code.google.com/p/android-flowtextview/ Example: <com.pagesuite.flowtext.FlowTextView android:id="@+id/titleTv"

Android : import libraries Like PhotoView

蹲街弑〆低调 提交于 2020-01-03 04:55:11
问题 I'm a beginner in android programming And I have problem importing this library to eclipse : External Link To Project (GitHub) I know how to import .jar files but I can't find any .jar file in it's libraries The question is : How can I use this type of libraries (with only .java files) ? Thanks in advance 回答1: Just pull that library project from git repo and follow this link on developer's site. 回答2: (I understand it's a very old question, but I thought adding this would be beneficial and

How to include a dependency inside an Android library?

有些话、适合烂在心里 提交于 2020-01-03 02:01:07
问题 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? 回答1: Gradle supports transitive dependencies. For a local library, this works like this: compile(project(:LIBRARY_NAME)) { transitive=true }

Changes to Android library project are not applied until restarting Eclipse

北慕城南 提交于 2020-01-03 01:48:50
问题 I have a main Android application that is using an Android library project. When I change my library project and Build Project or Build All the changes are not detected in main project until I clean the main project or close and reopen Eclipse. How con I solve this problem? Is there any rapid solution? Update I am using: Eclipse 3.7.1 Android SDK API 15 Rev 3 Android SDK Tools Rev 19 Android SDK Platform-tools Rev 11 回答1: Solution 1) I clicked on Android Dependencies in Package Explorer and

Start Activity of Main project from my library project

陌路散爱 提交于 2020-01-02 17:54:14
问题 I have 2 projects. One is my Main Project(A) , and another is a Library Project(B). I want to start an activity which is present in A from an activity which is located in B. How do I do that ? I Tried startActivity(getApplicationContext(),B.class); ,but B.class is not resolved. How Can I let my library project start an activity of my main project ? 回答1: You can add custom Action in intent-filter of you activity and start that activity by specifying action <activity android:name="my.package

How to “install” Action Bar Sherlock?

房东的猫 提交于 2020-01-02 01:36:05
问题 I'm trying to build the sample project "Action Bar Styled" using the Action Bar Sherlock. I download the .zip file containing ABS here http://actionbarsherlock.com/ but I can't figure out where to unzip so that it will appear on Project>Properties>Add library. Can someone give me an hand? Also, I read somewhere (can't find it now, sorry) that the current Android Compatibility library supports the Action Bar in pre 3.0 versions, so it has basically the same "effect" as Action Bar Sherlock -