Can't import Android library
I'm trying to use RecyclerView Helper, but can't get project work with it.
Here is the library that I'm trying to use: https://github.com/nisrulz/recyclerviewhelper
But getting this error:
Could not find method implementation() for arguments [com.android.support:appcompat-v7:latest version] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager.
This is my build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript
repositories
google()
jcenter()
dependencies
classpath 'com.android.tools.build:gradle:3.4.0'
def supportLibVersion="latest version"
// Required
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
// RecyclerViewHelper
implementation "com.github.nisrulz:recyclerviewhelper:$supportLibVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
allprojects
repositories
google()
jcenter()
task clean(type: Delete)
delete rootProject.buildDir
android jcenter
add a comment |
I'm trying to use RecyclerView Helper, but can't get project work with it.
Here is the library that I'm trying to use: https://github.com/nisrulz/recyclerviewhelper
But getting this error:
Could not find method implementation() for arguments [com.android.support:appcompat-v7:latest version] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager.
This is my build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript
repositories
google()
jcenter()
dependencies
classpath 'com.android.tools.build:gradle:3.4.0'
def supportLibVersion="latest version"
// Required
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
// RecyclerViewHelper
implementation "com.github.nisrulz:recyclerviewhelper:$supportLibVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
allprojects
repositories
google()
jcenter()
task clean(type: Delete)
delete rootProject.buildDir
android jcenter
add a comment |
I'm trying to use RecyclerView Helper, but can't get project work with it.
Here is the library that I'm trying to use: https://github.com/nisrulz/recyclerviewhelper
But getting this error:
Could not find method implementation() for arguments [com.android.support:appcompat-v7:latest version] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager.
This is my build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript
repositories
google()
jcenter()
dependencies
classpath 'com.android.tools.build:gradle:3.4.0'
def supportLibVersion="latest version"
// Required
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
// RecyclerViewHelper
implementation "com.github.nisrulz:recyclerviewhelper:$supportLibVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
allprojects
repositories
google()
jcenter()
task clean(type: Delete)
delete rootProject.buildDir
android jcenter
I'm trying to use RecyclerView Helper, but can't get project work with it.
Here is the library that I'm trying to use: https://github.com/nisrulz/recyclerviewhelper
But getting this error:
Could not find method implementation() for arguments [com.android.support:appcompat-v7:latest version] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager.
This is my build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript
repositories
google()
jcenter()
dependencies
classpath 'com.android.tools.build:gradle:3.4.0'
def supportLibVersion="latest version"
// Required
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
// RecyclerViewHelper
implementation "com.github.nisrulz:recyclerviewhelper:$supportLibVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
allprojects
repositories
google()
jcenter()
task clean(type: Delete)
delete rootProject.buildDir
android jcenter
android jcenter
edited Nov 12 '18 at 4:19
Faysal Ahmed
3,62341130
3,62341130
asked Nov 11 '18 at 20:07
Andy D
537
537
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
This is the project.gradle file ,you import library in wrong gradle file.please import this library on app.gradle file.
Import this on app.gradle
dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.nisrulz:recyclerviewhelper:27.1.1'
Import this on project.gradle
allprojects
repositories
google()
jcenter()
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
add a comment |
I think the latest version
is a placeholder text. The latest version
should be replaced with the latest version of SDK you need.
Please use this
def supportLibVersion="27.1.1"
instead of
def supportLibVersion="latest version"
Your library documentation also have this line
where
latest version
corresponds to published version in27.1.1
.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53252734%2fcant-import-android-library%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is the project.gradle file ,you import library in wrong gradle file.please import this library on app.gradle file.
Import this on app.gradle
dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.nisrulz:recyclerviewhelper:27.1.1'
Import this on project.gradle
allprojects
repositories
google()
jcenter()
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
add a comment |
This is the project.gradle file ,you import library in wrong gradle file.please import this library on app.gradle file.
Import this on app.gradle
dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.nisrulz:recyclerviewhelper:27.1.1'
Import this on project.gradle
allprojects
repositories
google()
jcenter()
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
add a comment |
This is the project.gradle file ,you import library in wrong gradle file.please import this library on app.gradle file.
Import this on app.gradle
dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.nisrulz:recyclerviewhelper:27.1.1'
Import this on project.gradle
allprojects
repositories
google()
jcenter()
This is the project.gradle file ,you import library in wrong gradle file.please import this library on app.gradle file.
Import this on app.gradle
dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.nisrulz:recyclerviewhelper:27.1.1'
Import this on project.gradle
allprojects
repositories
google()
jcenter()
edited Nov 11 '18 at 20:55
answered Nov 11 '18 at 20:18
Vishal Sharma
7762212
7762212
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
add a comment |
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
is it work for you or not?
– Vishal Sharma
Nov 11 '18 at 20:24
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
yeah, thank you very much.
– Andy D
Nov 11 '18 at 20:43
add a comment |
I think the latest version
is a placeholder text. The latest version
should be replaced with the latest version of SDK you need.
Please use this
def supportLibVersion="27.1.1"
instead of
def supportLibVersion="latest version"
Your library documentation also have this line
where
latest version
corresponds to published version in27.1.1
.
add a comment |
I think the latest version
is a placeholder text. The latest version
should be replaced with the latest version of SDK you need.
Please use this
def supportLibVersion="27.1.1"
instead of
def supportLibVersion="latest version"
Your library documentation also have this line
where
latest version
corresponds to published version in27.1.1
.
add a comment |
I think the latest version
is a placeholder text. The latest version
should be replaced with the latest version of SDK you need.
Please use this
def supportLibVersion="27.1.1"
instead of
def supportLibVersion="latest version"
Your library documentation also have this line
where
latest version
corresponds to published version in27.1.1
.
I think the latest version
is a placeholder text. The latest version
should be replaced with the latest version of SDK you need.
Please use this
def supportLibVersion="27.1.1"
instead of
def supportLibVersion="latest version"
Your library documentation also have this line
where
latest version
corresponds to published version in27.1.1
.
edited Nov 11 '18 at 20:30
answered Nov 11 '18 at 20:15
Faysal Ahmed
3,62341130
3,62341130
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53252734%2fcant-import-android-library%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown