android 枚举运行进程,android - 错误:程序类型已经存在:com.google.protobuf.DescriptorProtos $ EnumDescriptorProto $ Bu...

文自怡
2023-12-01

几个小时后,我决定分享我的问题。

(以及数小时的堆栈溢出后)

根build.gradle

buildscript {

repositories {

google()

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:3.3.2'

classpath 'com.google.gms:google-services:4.2.0'

classpath 'com.google.firebase:firebase-plugins:1.1.5'

}

}

allprojects {

repositories {

google()

jcenter()

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

应用程式build.gradle

buildscript {

repositories {

maven { url 'https://maven.fabric.io/public' }

}

dependencies {

classpath 'io.fabric.tools:gradle:1.+'

}

}

apply plugin: 'com.android.application'

apply plugin: 'io.fabric'

apply plugin: 'com.google.firebase.firebase-perf'

repositories {

maven { url 'https://maven.fabric.io/public' }

}

apply plugin: 'com.google.gms.google-services'

android {

compileSdkVersion 28

useLibrary 'org.apache.http.legacy'

defaultConfig {

applicationId "com.binario12.fastpizza"

minSdkVersion 19

targetSdkVersion 28

versionCode 1

versionName "1.0"

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'])

implementation 'com.android.support:appcompat-v7:28.0.0'

implementation 'com.android.support:design:28.0.0'

implementation 'com.android.support:support-v4:28.0.0'

implementation 'com.android.support:recyclerview-v7:28.0.0'

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

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'

//Firebase

implementation 'com.google.firebase:firebase-core:16.0.7'

implementation 'com.google.firebase:firebase-messaging:17.4.0'

implementation 'com.google.firebase:firebase-auth:16.1.0'

implementation 'com.google.firebase:firebase-firestore:18.1.0'

implementation 'com.google.firebase:firebase-database:16.1.0'

implementation 'com.google.firebase:firebase-crash:16.2.1'

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'

implementation 'com.google.firebase:firebase-perf:16.2.3'

implementation 'com.google.firebase:firebase-config:16.3.0'

implementation 'com.google.android.libraries.places:places:1.0.0'

implementation 'com.google.maps.android:android-maps-utils:0.5'

implementation('com.lamudi.phonefield:phone-field:0.1.3@aar') {

transitive = true

}

//Graphic library Material Design

implementation "com.airbnb.android:lottie:2.5.0"

//Recycler view w/ HashMap

implementation 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:1.2.0'

implementation 'com.google.android.gms:play-services-analytics:16.0.7'

implementation 'com.google.android.gms:play-services-tagmanager-v4-impl:16.0.7'

//PageSliding

implementation 'com.jpardogo.materialtabstrip:library:1.1.1'

///Rating bar

implementation 'me.zhanghai.android.materialratingbar:library:1.3.2'

}

我还尝试使用命令./gradlew:app:dependencies查找依赖项,并且我已经看到protobuf存在于firebase-firestore和firebase-auth中。 我试图不使用添加{排除组:'com.google.protobuf'}的依赖项,但是它不起作用。

所有依赖项均设置为最新版本。 问题从我切换时开始:

implementation 'com.google.android.gms:play-services-maps:16.0.0'

implementation 'com.google.android.gms:play-services-places:16.0.0'

至 :

implementation 'com.google.android.libraries.places:places:1.0.0'

implementation 'com.google.maps.android:android-maps-utils:0.5'

 类似资料: