我应该在Android Studio的Gradle中将某些依赖项移动到“runtime”吗?


Android Studio中使用
gradle-lint-plugin,它暗示了这一点

: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:1.+@aar'

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:1.3.1@aar') {
    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

我应该接受建议吗?如果这些依赖项应该在运行时,为什么每个依赖项wiki / doc都没有这么说并且坚持告诉我们将依赖项放在编译中?

编辑:我尝试接受建议,换句话说,将关键字编译更改为运行时,如运行时’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>

所以有什么问题?

最佳答案 我相信apk是运行时的android,例如:

apk 'com.android.support:appcompat-v7:24.1.0'

有人说包

https://stackoverflow.com/a/28473873/360211

也许两者都有效,也许没有区别,也许就有了.我不知道非常难以理解的条款.

点赞