android - 构建完成并运行,但在类 android 上显示错误
问题描述
我在 android studio 上有一些奇怪的错误/错误,我的应用程序 gradle 是完整的并且在设备上运行顺利,但是它显示的错误,比如我的库没有完全包含在 android studio 中,我已经这样做了
- 清洁然后重建
- 使缓存无效并重新启动
这是我的应用程序 Gradle
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.host.appname"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
}
}
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/NOTICE.txt' // will not include NOTICE file
exclude 'META-INF/LICENSE.txt' // will not include LICENSE file
}
这是我的项目 gradle
buildscript {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
所以我可以运行我的应用程序,我可以使用它,但它对我来说真的很烦人,因为我不能对错误库和到处的红色标记使用自动完成。
谢谢你..
解决方案
推荐阅读
- java - 创建新对象会覆盖与先前对象关联的 ObservableList
- spring-boot - rsyslog 是否与 Logback-SLF4J 兼容?
- swift - 删除tableview行和发布请求逻辑
- r - 如何在R中以字符形式构建条件滚动序列
- php - Laravel LdapRecord 数组
- java - 在 Spring Boot 中使用时 SonarQube API 日期+时区不起作用
- r - 多类中的可变重要性
- python - ProgrammingError: 1698 (28000): Access denied for user 'root'@'localhost when using mysql.connector in python
- sql - 处理 SSAS 多维数据集的速度比处理多维数据集的速度快
- cairo - 使用模式生成时访问 cairo_path_t