1.检查是否正确引入
implementation 'org.litepal.guolindev:core:3.2.3'
2.检查在AndroidManifest.xml中配置是否正确
<application
android:name="org.litepal.LitePalApplication"
………
>
<activity
…………
>
</activity>
</application>
3.在settings.gradle中配置一下内容
jcenter()
maven { url 'https://jitpack.io' }
写在 dependencyResolutionManagement -> repositories的花括号内
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
……
jcenter()
maven { url 'https://jitpack.io' }
}
}