Android 无法排除未使用的依赖项
我试图从play services映射中排除支持注释,但似乎不起作用。与此相关的依赖关系树粘贴在下面。请让我知道如何添加排除项 这就是我试图排除的方式Android 无法排除未使用的依赖项,android,build.gradle,Android,Build.gradle,我试图从play services映射中排除支持注释,但似乎不起作用。与此相关的依赖关系树粘贴在下面。请让我知道如何添加排除项 这就是我试图排除的方式 compile ('com.google.android.gms:play-services-maps:9.6.1', { exclude group: 'com.android.support', module: 'support-annotations' }) 这就是那棵树 _releaseApk - ## Internal use
compile ('com.google.android.gms:play-services-maps:9.6.1',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
这就是那棵树
_releaseApk - ## Internal use, do not manually configure ##
+--- com.google.android.gms:play-services-maps:9.6.1
| +--- com.google.android.gms:play-services-base:9.6.1
| | +--- com.google.android.gms:play-services-basement:9.6.1
| | | \--- com.android.support:support-v4:24.0.0 -> 25.1.0
| | | +--- com.android.support:support-compat:25.1.0
| | | | \--- com.android.support:support-annotations:25.1.0
| | | +--- com.android.support:support-media-compat:25.1.0
| | | | +--- com.android.support:support-annotations:25.1.0
| | | | \--- com.android.support:support-compat:25.1.0 (*)
| | | +--- com.android.support:support-core-utils:25.1.0
| | | | +--- com.android.support:support-annotations:25.1.0
| | | | \--- com.android.support:support-compat:25.1.0 (*)
添加了依赖项的完整列表
我想你的语法有错误。 应该是这样的:
compile ('com.google.android.gms:play-services-maps:9.6.1')
{
exclude group: 'com.android.support', module: 'support-annotations'
}
你能把整个格雷德尔档案都贴出来吗?
compile ('com.google.android.gms:play-services-maps:9.6.1')
{
exclude group: 'com.android.support', module: 'support-annotations'
}