【发布时间】:2018-06-18 06:14:17
【问题描述】:
尝试运行我的应用时出现此错误 - 程序类型已存在:android.support.v4.app.BackStackRecord$Op
我已经看完了这篇文章—— Program type already present: android.support.v4.app.BackStackRecord 还是没解决问题,下面是我的gradle文件供参考-
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.google"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services:9.4.0'
// // retrofit, gson
implementation 'com.google.code.gson:gson:2.6.2'
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
}
【问题讨论】:
-
添加你的项目级gradle文件代码。
-
出错的那一行显示完整的错误代码
标签: android gradle runtime-error