WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

更新日期: 2018-12-21 阅读次数: 10342 分类: Android

在 Android Studio 上测试 Volley 发送 HTTP 请求时,编译报错

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

解决方法

将 app 下的 build.gradle 中的

compile 'com.android.volley:volley:1.1.1'

替换为

implementation 'com.android.volley:volley:1.1.1'

测试环境

Android Studio 3.2.1

Build #AI-181.5540.7.32.5056338, built on October 9, 2018

JRE: 1.8.0_152-release-1136-b06 amd64

JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Windows 10 10.0

关于作者 🌱

我是来自山东烟台的一名开发者,有敢兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊, 查看更多联系方式