- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我已将我的 Unity 项目导出到 Android Studio 项目。我想通过 Studio 将 Firebase Messaging 添加到我的项目中,因为统一实现的 Firebase Messaging 无法正常工作。
所以我将以下代码添加到我的 app/build.gradle
中,这导致了我所有这些问题。
dependencies {
.
.
.
compile('com.google.firebase:firebase-messaging:11.8.0') {
exclude module: 'support-v4'
}
}
buildscript {
.
.
.
dependencies {
.
.
.
classpath 'com.google.gms:google-services:3.1.1'
}
apply plugin: 'com.google.gms.google-services'
我已将 google-services.json
文件添加到应用目录。
如果我对 build.gradle
中的大部分 aar 依赖项进行注释,应用程序将成功构建而不会出现任何错误。但是我在我的项目中使用的 Firebase 分析不起作用。
构建应用程序时出现以下错误。
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
and
.
.
.
Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/0.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/1.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/2.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/3.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/4.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/5.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/6.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/7.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/8.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/9.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/10.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/11.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/12.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/13.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/14.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/15.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/16.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/17.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/19.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/21.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/23.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/24.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/29.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/32.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/34.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/35.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/36.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/37.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/38.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/39.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/40.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/41.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/42.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/43.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/44.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/45.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/46.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/47.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/66.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/68.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/69.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/70.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/71.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/72.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/73.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/80.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/82.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/83.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/84.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/85.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/86.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/87.jar
at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 107 more
Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/0.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/1.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/2.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/3.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/4.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/5.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/6.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/7.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/8.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/9.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/10.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/11.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/12.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/13.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/14.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/15.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/16.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/17.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/19.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/21.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/23.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/24.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/29.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/32.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/34.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/35.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/36.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/37.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/38.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/39.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/40.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/41.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/42.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/43.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/44.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/45.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/46.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/47.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/66.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/68.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/69.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/70.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/71.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/72.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/73.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/80.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/82.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/83.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/84.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/85.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/86.jar, /Users/nabeelkottol/Downloads/VR DEVOTEE 2/build/intermediates/transforms/dexBuilder/debug/87.jar
at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:124)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:109)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:101)
at com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:123)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
... 123 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:76)
at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:45)
at com.android.tools.r8.D8.run(D8.java:88)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:107)
... 128 more
Caused by: com.android.tools.r8.utils.AbortException
at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:77)
at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:58)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:67)
... 131 more
和
Program type already present: com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver
Message{kind=ERROR, text=Program type already present: com.google.android.gms.measurement.AppMeasurementContentProvider, sources=[Unknown source file], tool name=Optional.of(D8)}
我相信这是由于重复的依赖关系而发生的。我对 gradle 的了解不够,无法找出那个特定的包并从构建中排除。任何帮助是极大的赞赏。谢谢。
我的 build.gradle
如下:
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.1.1'
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
google()
}
}
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name: 'androidnative', ext: 'aar')
compile(name: 'com.android.support.support-compat-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-core-ui-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-core-utils-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-fragment-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-media-compat-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-v4-25.2.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-base-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-base-license-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-basement-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-basement-license-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-tasks-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-tasks-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-impl-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-impl-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-unity-4.4.1', ext: 'aar')
compile(name: 'com.google.firebase.firebase-app-unity-4.4.1', ext: 'aar')
compile(name: 'com.google.firebase.firebase-common-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-common-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-core-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-iid-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-iid-license-11.8.0', ext: 'aar')
compile(name: 'exoplayer-r1.5.11', ext: 'aar')
compile(name: 'gvr-exoplayersupport-release', ext: 'aar')
compile(name: 'gvr_android_common', ext: 'aar')
compile(name: 'installreferrer-1.0', ext: 'aar')
compile(name: 'kalpnikutilitylibrary-release', ext: 'aar')
compile(name: 'mobile-native-popups', ext: 'aar')
compile(name: 'unitygvractivity', ext: 'aar')
compile project(':Firebase')
compile project(':answers')
compile project(':beta')
compile project(':crashlytics')
compile project(':crashlytics-wrapper')
compile project(':fabric')
compile project(':fabric-init')
compile('com.google.firebase:firebase-messaging:11.8.0') {
exclude module: 'support-v4'
}
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
targetSdkVersion 27
applicationId 'applicationId'
multiDexEnabled true
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb'
}
buildTypes {
debug {
jniDebuggable true
}
release {
// Set minifyEnabled to true if you want to run ProGuard on your project
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
}
}
}
apply plugin: 'com.google.gms.google-services'
最佳答案
我无法测试我准备的build.gradle
。但是,我认为以下 gradle 应该可以工作。
让我把我添加的东西放到你的gradle中。
DexArchiveMergerException
主要是因为没有 multidexEnabled true
。我已经添加了属性。
将 apply plugin: 'com.android.application'
移动到顶部。
在 dexOptions
部分添加了 javaMaxHeapSize "4g"
。添加了 resolutionStrategy
以防发现同一库的多个版本以及 packagingOption
。
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
google()
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
google()
}
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
targetSdkVersion 27
applicationId 'applicationId'
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb'
}
buildTypes {
debug {
jniDebuggable true
}
release {
// Set minifyEnabled to true if you want to run ProGuard on your project
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
}
}
}
android.packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:25.2.0'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name: 'androidnative', ext: 'aar')
compile(name: 'com.android.support.support-compat-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-core-ui-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-core-utils-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-fragment-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-media-compat-25.2.0', ext: 'aar')
compile(name: 'com.android.support.support-v4-25.2.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-base-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-base-license-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-basement-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-basement-license-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-tasks-11.8.0', ext: 'aar')
compile(name: 'com.google.android.gms.play-services-tasks-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-impl-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-impl-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-analytics-unity-4.4.1', ext: 'aar')
compile(name: 'com.google.firebase.firebase-app-unity-4.4.1', ext: 'aar')
compile(name: 'com.google.firebase.firebase-common-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-common-license-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-core-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-iid-11.8.0', ext: 'aar')
compile(name: 'com.google.firebase.firebase-iid-license-11.8.0', ext: 'aar')
compile(name: 'exoplayer-r1.5.11', ext: 'aar')
compile(name: 'gvr-exoplayersupport-release', ext: 'aar')
compile(name: 'gvr_android_common', ext: 'aar')
compile(name: 'installreferrer-1.0', ext: 'aar')
compile(name: 'kalpnikutilitylibrary-release', ext: 'aar')
compile(name: 'mobile-native-popups', ext: 'aar')
compile(name: 'unitygvractivity', ext: 'aar')
compile project(':Firebase')
compile project(':answers')
compile project(':beta')
compile project(':crashlytics')
compile project(':crashlytics-wrapper')
compile project(':fabric')
compile project(':fabric-init')
compile('com.google.firebase:firebase-messaging:11.8.0') {
exclude group: 'com.android.support'
}
}
apply plugin: 'com.google.gms.google-services'
如果问题没有解决,请尝试将您的应用程序启用为MultiDexApplication
,如前所述here .
如果您遇到任何进一步的错误或不同类型的错误,请告诉我。
关于android - 组织.gradle.api.tasks.TaskExecutionException : Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49938404/
我是 Django 新手并开始了一个项目,我想以正确的方式去做。 我想知道您认为组织项目的最佳实践是什么。 以下是我的一些问题: 如何将静态资源与 Python 代码分开,以免浪费时间通过 Djang
通过这个组织,是否可以引用“id”属性? function house(id) { this.id = id } house.prototype.buy = function() { }
我的任务是“识别并修复任何错误”。这张取自 Java 教科书的图片显示了 Swing 结构的组织。这对我来说很好,我没有发现任何问题。 谁能解释一下? JPanel 应该放在 JComponent 之
重要的事情 是否可以确定 WHERE 条件的最佳顺序以使其更快?例如,我有一个包含 6 个条件的查询。一些简单,另一些带有子查询或函数。我的想法是对查询进行概要分析,以确定条件语句 true 的常见程
我有 Java/AS3/Javascript 背景,我的所有类都组织成包,以帮助表示它们的功能。 在开始一个 C++ 项目时,我试图以几乎相同的方式模仿这个文件系统结构,但我一直遇到包含问题。 目前我
我正在使用 CKAN 作为开放数据门户。我已经完成了 CKAN 实例的设置并添加了数据集、组和组织。 主页上有一个特色组和一个特色组织框。如何在主页上显示我想要的组和组织。 如何在主页上更改这些特色组
我已经创建了我的第一个 iPhone 应用程序,它可以在表格 View 中显示类似类型的音轨。用户可以使用类似 ipod 的控件来播放音轨,这些控件可以流式传输 mp3。 我的所有代码都在两个主要类中
我将我的代码组织成 20-60 行模块,通常采用模块模式。我想要一个结构良好的面向对象的 JavaScript 库。 这是最好的方法吗?代码已经过测试并且有效。 我喜欢它,因为程序员可以从库中提取模块
我正在使用 riot.js 和 jquery 构建一个应用程序。一切都按预期工作,但是随着代码的增长,我也担心在代码中随机/意外的地方触发和处理事件 (.trigger/.on) 对保持我的代码有条理
这是另一个 GIT 新手。 我想在我们的项目中使用 GIT。 团队不熟悉 GIT。 这些项目基本上由一些通用项目(*)和一些应用项目组成。应用程序正在使用公地,公地也可以使用其他公地。通过“使用”我的
例如,考虑一个组织有一个包含两个分支的存储库的情况,master 和 1.0.0.1。 是否可以让团队对 master 具有只读访问权限,而对分支 (1.0.0.1) 具有读写访问权限? 最佳答案 自
我一直致力于寻找组织 CSS 代码的最佳方式,尤其是在大型网站上。我对编写风格不太感兴趣,而对人们如何构建和管理他们的代码更感兴趣。 我一直在遵循这个结构,我觉得它在可维护性方面工作得很好,但我想听取
我们正在扩展到一个大型微服务构建,并通过 postman 完成更多测试(现场验证、错误测试等)。好奇...您的团队如何组织大量 API 的集合? (按 API、按测试类型、按发布等)从一个团队传递到另
我最近遇到了这个编码面试问题,但似乎找不到答案。这是问题。 给定一个整数数组,编写一个函数,返回组织数组所需的最小交换,使得相邻元素的绝对差都小于或等于 K。交换可以是任意两个数组元素,不一定是相邻的
我有 100 多页。所有页面都使用不同的模板。 目前,我有一长串 .state('page.html').state('page2.html') 等。10-15 页后,我认为这变得不可读/难以管理。
我看下grails-app/i18n有一吨messages*.properties捆绑。我想将我的应用程序国际化,但每页有 1 个“捆绑集”。我所说的包集是指包含相同文本但用于不同语言的一组包/属性文
我正在编写一个非常非常长的 CUDA 内核,它对人类的可读性来说非常糟糕。有什么方法可以用内核外部的功能组织 CUDA 内核吗?示例: __global__ void CUDA_Kernel(int*
我的公司要求我将Outlook用于我的电子邮件。 Outlook几乎不执行我想做的任何事情,这让我感到非常沮丧。 (我并不是要在这里发动一场火焰大战,它必须完全执行数千名CEO想要做的事情,但我不是C
我一直在尝试一些不同的方法来组织我的 javascript 应用程序中的代码,我想知道哪种方法最合适。 第一个例子: var Application = { init: function()
Angular 样式指南包含有关在应用程序中使用类和接口(interface)的最佳实践的信息。但它没有任何关于如何组织我的接口(interface)和模型类的信息。 有一个问题:关于文件和类的组织有
我是一名优秀的程序员,十分优秀!