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

Error:Module 'com.wu-man:android-oauth-client:0.4.4' depends on one or more Android Libraries but is a jar #58

Open
coderbec opened this issue Jun 20, 2016 · 7 comments

Comments

@coderbec
Copy link

getting this build error in gradle.

one work around is to force it to use the aar by putting

compile 'com.wu-man:android-oauth-client:0.4.4@aar' in the gradle dependecies

@akhatriST
Copy link

What is the solution for this problem? I am facing the same issue

@coderbec
Copy link
Author

As above, instead of using the gradle line wuman has in the docs, you need to but @aar in it which forces gradle to pull a valid format. I'm guess wuman hasn't configured the library correctly in the root directory or something.

@akhatriST
Copy link

akhatriST commented Jun 26, 2016

Putting an @aar in the end resolved the build error, but now what is happening that it did not get all the dependencies of this library like JacksonFactory, ClientParametersAuthentication, etc...
Do I have to add these missing dependencies of this library in my project? or is it the library should have got them.

@coderbec
Copy link
Author

Er yeah no idea what's going on with gradle... At this point best option is to download the actual .jar, import it to the libs folder, right click and add as a library ¯_(ツ)_/¯

@akhatriST
Copy link

akhatriST commented Jun 27, 2016

Are you talking about the jar from maven?
Will adding this jar of this library resolve all the dependencies? or still I will need to add those explicitly in my app?

@akhatriST
Copy link

Finally I've got it to work.
I ve added the library project provided in the repo to my project as a dependency in my build.gradle
compile project (':library').
and It got all the underlying dependencies of the library as well.

@praneetloke
Copy link

This is what I did to resolve my issue. Thanks to this issue.

    compile 'com.wu-man:android-oauth-client:0.4.5@aar'
    compile('com.google.api-client:google-api-client-android:1.20.0') {
        exclude group: 'com.google.android.google-play-services', module: 'google-play-services'
        exclude group: 'junit', module: 'junit'
        exclude group: 'com.google.android', module: 'android'
    }
    compile 'com.google.oauth-client:google-oauth-client-java6:1.20.0'
    compile 'com.google.http-client:google-http-client-jackson:1.20.0'

You can update the versions of the dependencies for this project to newer versions if you'd like. If you are pulling in the @aar for this project, then you will also need to open your AndroidManifest.xml and add the tools namespace xmlns:tools="http://schemas.android.com/tools" and also tools:replace="android:allowBackup" to the <application> tag.

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