Android Studio语法在谷歌地图示例项目中突出显示红色,尽管它';It’很好

Android Studio语法在谷歌地图示例项目中突出显示红色,尽管它';It’很好,android,google-maps,android-studio,syntax,Android,Google Maps,Android Studio,Syntax,我按照找到的GoogleMapsSDK的示例项目进行操作,它工作得非常好。但是,MapsMarketActivity中的语法高亮显示大部分为红色,如中所示 我很好奇为什么会这样,以及我将如何着手解决它 另一方面,编译器还输出以下警告: [![WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. WARNING: Configuration 'andr

我按照找到的GoogleMapsSDK的示例项目进行操作,它工作得非常好。但是,MapsMarketActivity中的语法高亮显示大部分为红色,如中所示

我很好奇为什么会这样,以及我将如何着手解决它

另一方面,编译器还输出以下警告:

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

WARNING: Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'.

WARNING: Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'.

WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.

WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.][2]][2]

我在哪里可以找到这些过时的代码,替换它们的最佳方法是什么?

1.对于红色下划线,可能是一个lint bug,请尝试将android studio和gradle插件更新到最新版本。如果仍然失败,请禁用lint选项,如下图所示:

2对于这些警告,只需按照IDE提示执行,例如,用实现替换编译。其他警告的处理方式相同

implementation 'com.android.support:appcompat-v7:28.0.0'