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

Gradle Build in Android Studio #180

Open
gitloko opened this issue Apr 28, 2015 · 8 comments
Open

Gradle Build in Android Studio #180

gitloko opened this issue Apr 28, 2015 · 8 comments

Comments

@gitloko
Copy link

gitloko commented Apr 28, 2015

Hello, when i copy and paste these lines in android studio's gradle.build it tells me that it can't resolve it

repositories {
mavenCentral()
}

dependencies {
compile 'com.etsy.android.grid:library:22.0.0' // read below comment
}

@wnafee
Copy link

wnafee commented Apr 29, 2015

@lokmansahraoui There is no version 22.0.0 for this library
If you look at the Change Log the latest is version 1.0.5

@gitloko
Copy link
Author

gitloko commented Apr 29, 2015

thank you, i just figured all out by implementing the /library folder as a module on android studio, well when i call an object like : private StaggerdGridView mSGridView and then call it in my java from the layout with mSGridView = (StaggeredGridView) rootView.findViewById(R.id.grid_view);

Knowing that in my XML layout i added
<com.etsy.android.grid.StaggeredGridView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:item_margin="8dp"
app:column_count="@integer/column_count" />

it tells me uknown app:item_margin and app:column_count in my package

@wnafee
Copy link

wnafee commented Apr 29, 2015

Make sure you copy over the attr.xml attributes file.

You should really consider just including the library dependency instead of copying over files to your project in a module. That way you can be up-to-date with any improvements to this library.

Just add this to your dependency instead compile 'com.etsy.android.grid:library:1.0.5'. It will save you a ton of hassle

@gitloko
Copy link
Author

gitloko commented Apr 29, 2015

So i delete the imported module (/library) and add
compile 'com.etsy.android.grid:library:1.0.5'
in my app's Build.Gradle dependencies and that's it ?

@wnafee
Copy link

wnafee commented Apr 29, 2015

yes it's that simple :)

@gitloko
Copy link
Author

gitloko commented Apr 29, 2015

:( same result as when i put 22.0.0 yesterday, i'm using the app:Build.gradle
C:\Users\Lokman\AndroidStudioProjects\TryOuts\app\build.gradle
Error:(26, 13) Failed to resolve: com.etsy.android.grid:library:1.0.5
Show in File
Show in Project Structure dialog

@gitloko
Copy link
Author

gitloko commented Apr 29, 2015

at LAst ! :D ! the problem was in my android studio beacause of the update the offline mode was activated, it was like i hadn't internet connection :)

just went to File/Settings/Gradle...; and then unchecked offline mode

@Neha--Agarwal
Copy link

I am facing the same problem. None of the solutions are working for me.
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.etsy.android.grid:library:1.0.5.

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