Использование gradle-lint-plugin в Android Studio, он намекает, чтоДолжен ли я переместить некоторые зависимости в «runtime» в Gradle в Android Studio?
:lintGradle
This project contains lint violations. A complete listing of the
violations follows. Because none were serious, the build's overall
status was unaffected.
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:43 compile 'com.android.support:appcompat-v7:24.1.0'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:44 compile 'com.android.support:design:24.1.0'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:45 compile 'com.android.support:cardview-v7:24.1.0'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:52 compile
'com.github.gigamole.arcprogressstackview:library:+'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:53 compile 'com.github.dexafree:materiallist:3.2.1'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:54 compile 'com.android.volley:volley:1.0.0'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:55 compile 'com.cocosw:bottomsheet:[email protected]'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:57 compile 'com.android.support:support-v4:+'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:58 compile 'com.github.shem8:material-login:1.4.0'
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:64
compile('com.github.ozodrukh:CircularReveal:[email protected]') {
transitive = true; }
this dependency should be moved to the runtime configuration since it
has no classes warning unused-dependency
app/build.gradle:74 compile 'com.github.rey5137:material:1.2.4'
? app/build.gradle: 11 problems (0 errors, 11 warnings)
To apply fixes automatically, run fixGradleLint, review, and commit
the changes.
BUILD SUCCESSFUL
Должен ли я взять совет? Если эти зависимости должны быть в runtime
, почему каждая зависимость wiki/doc не говорит об этом и настаивает на том, что нам нужно устанавливать зависимости в compile
?
Редактировать: Я пытаюсь принять совет, другими словами, сменить ключевое слово compile
на runtime
, например runtime 'com.android.support:appcompat-v7:24.1.0'
. Тем не менее, Android Studio намекает, что
Error:Could not find method runtime() for arguments
[com.android.support:appcompat-v7:24.1.0] on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK
Manager. <a href="openAndroidSdkManager">Open Android SDK Manager</a>
Так в чем проблема?
см. Обновление пожалуйста. – guo
Хм, странно. Может быть, вы должны опубликовать свой 'build.gradle' – Vampire