在Android Studio中生成JavaDoc文档时出现错误: 程序包android.content不存在
import android.content.Context;
Android SDK中的接口没有拿到,找到Android SDK中android.jar包。

在这里插入图片描述
把这个Jar包导入,再生成就可以了。运行APP时记得将其删除。

dependencies {

    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
//    implementation files('libs/android.jar')
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐