android - Android Studio:尝试了解编译和实现之间的区别

标签 android gradle build compilation

这是我的代码,我想在build.grandle中插入以便我可以处理我的项目:

compile 'com.android.support: design: 25.3.1'
compile 'com.android.support: recyclerview-v7:25.3.1'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'com.wdullaer:materialdatetimepicker:1.2.1'
compile 'com.bignerdranch.android:recyclerview-multiselect:+'
compile 'com.wrapp.floatlabelededittext:library:0.0.6'

当我尝试同步时,是这样说的:
ERROR: Failed to resolve: com.android
Affected Modules: app


WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: app

然后“implementation 'com.android.support:appcompat-v7:28.0.0-rc02'”行在红线下。

对不起,我的英语,希望您能理解我的问题。我是Android Studio的初学者,对我来说是如此轻松:D

最佳答案

':'之前/之后不应有空格。检查并删除编译行中的空格,您应该能够正确地将项目与gradle文件同步。因此,例如在您粘贴的代码中,应在设计和回收之前删除空格。

compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'

P.S-查​​看注释中提供的链接,以正确理解编译,实现和api。

关于android - Android Studio:尝试了解编译和实现之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56979545/

相关文章:

android - 如何在Play商店中发布产品口味演示与完整版本

android - Eclipse与Android共享资源

android - 搜索特定的 Play 商店类别

连接停止时android蓝牙崩溃

android - 没有可用于离线模式的缓存版本

java - Jhipster gradle 构建未加载生产配置文件

android - 在 xml 布局中使用 android MediaController

android - 使用 Google Daydream sdk 为 Lenovo mirage solo 耳机开发应用程序

gradle - 如何将默认 jvm args 设置为 gradle 应用程序插件?

gradle - Gradle复制任务扩展了执行时派生的属性