近日,我在学习第一行代码时,需要引入LitePal时,在Manifest文件时出现Class referenced in the manifest, org.litepal.LitePalApplication, was not found in the project or the libraries,
android:name="org.litepal.LitePalApplication"
在项目的根目录对应的settings.gradle
小红框对应位置添加
jcenter()
maven { url 'https://jitpack.io' }
添加了之后别忘在app的build.gradle里把引入LitePal的这句话
implementation 'org.litepal.guolindev:core:3.2.3'
删掉sync下,再添加回来再sync下,这时我们就会发现问题已经解决啦!!!!!!!!
如果还是无法解决,我还在项目根目录(app目录外面那个)的build.gradle里添加了这几行代码
buildscript {
repositories {
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
maven{ url 'https://maven.aliyun.com/repository/public'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
————————————————
版权声明:本文为优快云博主「七宗罪之懒惰」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.youkuaiyun.com/qq_42924347/article/details/123809960