gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 05:34:56 25 4
gpt4 key购买 nike

这是我的代码,我想在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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com