最好用的還是在Terminal中輸入命令:gradlew clean build 然後回車,就可查看問題,然後翻譯一下問題,逐個根據提示解決就好了。
問題一:Element uses-permission#com.android.launcher.permission.READ_SETTINGS at And
tools:replace specified at line:76 for attribute android:appComponentFactory
解決:
<application
tools:replace=“android:appComponentFactory” //除了這行之外
android:appComponentFactory=“任意字符” //還要加上這一行
問題二:WARNING: Conflict with dependency ‘com.squareup.okhttp3:okhttp’ in project ’
解決:加一行: implementation(“com.squareup.okhttp3:okhttp:3.11.0”)