解決方案
用這兩行
api 'com.huawei.android.hms:push:2.5.3.xxx'
api 'com.huawei.android.hms:base:2.5.3.xxx'
去替換
implementation 'com.huawei.android.hms:push:2.5.3.xxx'
原理可以自己去官網看android studio3.4和gradle plugin5.x.x以後api
,implementation
和compile
的區別,compile
已被棄用,最新版本推薦使用api