错误条件 按照《第一行代码》中操作,给app模块添加依赖: compile 'com.android.support.percent:24.2.1' ,gradle同步的时候报出以下错误: ERROR: Failed to resolve: com.android.support.percent:24.2.1: 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 解决过程 后上网查阅,发现两个错误: 我的Android Studio的版本是3.4.1(可以通过菜单栏Help-About查看),Android studio升级到3.0之后,compile就改为了implementation SDK版本是29(在app模块的build.gradle中指明),依赖的版本24.2.1