Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when using latest support library with aar. #30

Closed
intrications opened this issue Dec 30, 2013 · 6 comments
Closed

Problem when using latest support library with aar. #30

intrications opened this issue Dec 30, 2013 · 6 comments

Comments

@intrications
Copy link

I am using the 1.1.1 aar with Gradle.

I think because this library references the "r7" version of the support library that is in Maven Central, but I'm using the latest version of the support library provided by the local repository provided by the Android SDK, I'm getting the following error:

 Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice

Can the library be changed to use the (latest) version of the support library that is provided by the Android SDK? I know that works with Gradle but not sure about Maven.

@Michenux
Copy link

You can declare the dependency like this :

compile ('eu.inmite.android.lib:android-styled-dialogs:1.1.1')  {
      exclude group: 'com.google.android', module: 'support-v4'
}

But then, i have another exception at runtime:

    android.content.res.Resources$NotFoundException: File res/anim/abc_fade_out.xml from color state list resource ID #0x7f040001
            at android.content.res.Resources.loadColorStateList(Resources.java:2252)
            at android.content.res.Resources.getColor(Resources.java:817)
            at eu.inmite.android.lib.dialogs.BaseDialogFragment$Builder.create(BaseDialogFragment.java:264)
            at eu.inmite.android.lib.dialogs.BaseDialogFragment.onCreateView(BaseDialogFragment.java:66)

Tell me if it works.

@intrications
Copy link
Author

I'm getting a similar error:

android.content.res.Resources$NotFoundException: File res/anim/scringo_banner_slide_in_from_bottom.xml from color state list resource ID #0x7f040001

@davidvavra
Copy link
Contributor

Yep, I have same issues. It looks like the AAR generation in latest Android Maven plugin is not there yet. I have published and issue here:

https://code.google.com/p/maven-android-plugin/issues/detail?id=437

In the meantime I'm working on publishing aar via Gradle. I will specify support library as provided dependency so people can use newer support librarie with no problems.

@Michenux
Copy link

Michenux commented Jan 1, 2014

I confirm it is a bug in android maven plugin.
I have created a library project in Android Studio with all the code of android-styled-dialogs.
Then, i published with gradle the library(arr) into my local maven repository.
Then, i used it in my real project.
And it works great.

@davidvavra
Copy link
Contributor

I have finished building AAR with Gradle. It was pretty hard to release both AAR & APKlib into same version in Maven Central. Most problems were caused by the fact that latest support library is not available in Maven Central.

I have written a guide, next time it will be easier: https://github.com/inmite/android-styled-dialogs/wiki/How-to-release-an-update-to-Maven-Central-as-both-aar-and-apklib

Try version 1.1.2, it should work.

@intrications
Copy link
Author

1.1.2 works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants