【发布时间】:2018-12-07 10:36:06
【问题描述】:
我是 android 应用程序开发的新手,但我正在构建一个 AR 应用程序,该应用程序还使用 glide 从网站中选择一件艺术品,然后使用 AR 挂在墙上。
我得到“生成主 dex 列表时出错”,我不知道为什么。
我已经构建了主应用程序,然后从维基百科导入了 AR 部分,所以我想知道这是否会造成冲突。
我不确定向您展示的最佳方式是否是将项目上传到某个地方,然后让别人浏览它?
提前致谢
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "codingwithmitch.com.recyclerview"
minSdkVersion 19
targetSdkVersion 27
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
dexOptions {
javaMaxHeapSize "4g"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation (name: 'wikitudesdk', ext:'aar' )
implementation project(':arapp')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//recyclerview
implementation 'com.android.support:recyclerview-v7:27.1.0'
//glide
implementation 'com.github.bumptech.glide:glide:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
//circle imageview
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'androidx.multidex:multidex:2.0.0'
}
这是增强现实部分
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 19
targetSdkVersion 27
multiDexEnabled true
versionCode 1
versionName "8.0.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(name: 'wikitudesdk', ext: 'aar')
implementation 'com.google.ar:core:1.1.0'
}
repositories {
flatDir{
dirs 'libs'
}
}
【问题讨论】:
-
你能分享你的 build.gradle 文件吗?我猜是依赖不匹配。
-
查看已编辑的问题。希望这会有所帮助。我实际上将一个 aar 文件导入了我的应用程序,所以它看起来像有 2 个 build.gradles。上一个是主应用,第二个是 AR 部分
标签: android augmented-reality android-glide wikitude