Flutterfire: 🐛 [firebase_remote_config] Old version of protobuf is used

Created on 12 Oct 2020  ·  7Comments  ·  Source: FirebaseExtended/flutterfire

Bug report

Describe the bug
I noticed that the firebase Flutter plugin is still using an outdated version of protobuf. On Android native com.google.protobuf:protobuf-javalite:3.11.0 is used.
When I run ../gradlew dependencies :app:dependencies in my app I still see the old com.google.protobuf:protobuf-lite:3.0.1 . This leads to collisions with other plugins that are using the newer version.

Bug details

Click To Expand

Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractParser found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractProtobufList found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.BooleanArrayList found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteBufferWriter found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteOutput found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$1 found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$ArraysByteArrayCopier found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$BoundedByteString found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$ByteArrayCopier found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$ByteIterator found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$CodedBuilder found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$LeafByteString found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$LiteralByteString found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$Output found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$SystemByteArrayCopier found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedInputStream found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$1 found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$AbstractBufferedEncoder found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$ArrayEncoder found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$ByteOutputEncoder found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$OutOfSpaceException found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$OutputStreamEncoder found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.DoubleArrayList found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ExperimentalApi found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ExtensionLite found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ExtensionRegistryFactory found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ExtensionRegistryLite found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ExtensionRegistryLite$ObjectIntPair found in modules jetified-protobuf-javalite-3.13.0.jar (com.google.protobuf:protobuf-javalite:3.13.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)

Steps to reproduce

Steps to reproduce the behavior:

1.Create flutter sample app

  1. add firebase_remote_config: ^0.4.0+2 to pubspec.yaml
  2. Run ./gradlew dependencies :app:dependencies in app dir

Expected behavior

I would expected the plugin to use the current Firebase BOM dependencies.


Additional context

Output ./gradlew dependencies :app:dependencies

Click To Expand

+--- project :firebase_remote_config
|    +--- project :firebase_core
|    |    +--- io.flutter:flutter_embedding_debug:1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec (*)
|    |    +--- com.google.firebase:firebase-bom:25.3.1
|    |    |    +--- com.google.firebase:firebase-config:19.1.4 (c)
|    |    |    +--- com.google.firebase:firebase-core:17.4.1 (c)
|    |    |    \--- com.google.firebase:firebase-analytics:17.4.1 (c)
|    |    +--- com.google.firebase:firebase-core -> 17.4.1
|    |    |    \--- com.google.firebase:firebase-analytics:17.4.1
|    |    |         +--- com.google.android.gms:play-services-measurement:17.4.1
|    |    |         |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |         |    +--- androidx.legacy:legacy-support-core-utils:1.0.0
|    |    |         |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |         |    |    +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    +--- androidx.documentfile:documentfile:1.0.0
|    |    |         |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |         |    |    +--- androidx.loader:loader:1.0.0 (*)
|    |    |         |    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|    |    |         |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |         |    |    \--- androidx.print:print:1.0.0
|    |    |         |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |         |    +--- com.google.android.gms:play-services-basement:17.0.0
|    |    |         |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    \--- androidx.fragment:fragment:1.0.0 -> 1.1.0 (*)
|    |    |         |    +--- com.google.android.gms:play-services-measurement-base:[17.4.1] -> 17.4.1
|    |    |         |    |    \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    +--- com.google.android.gms:play-services-measurement-impl:[17.4.1] -> 17.4.1
|    |    |         |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0
|    |    |         |    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-measurement-base:[17.4.1] -> 17.4.1 (*)
|    |    |         |    |    \--- com.google.android.gms:play-services-stats:17.0.0
|    |    |         |    |         +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    |         |    |         \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    |    |         +--- com.google.android.gms:play-services-measurement-api:17.4.1
|    |    |         |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    +--- com.google.android.gms:play-services-measurement-base:[17.4.1] -> 17.4.1 (*)
|    |    |         |    +--- com.google.android.gms:play-services-measurement-impl:[17.4.1] -> 17.4.1 (*)
|    |    |         |    +--- com.google.android.gms:play-services-measurement-sdk-api:[17.4.1] -> 17.4.1
|    |    |         |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    \--- com.google.android.gms:play-services-measurement-base:[17.4.1] -> 17.4.1 (*)
|    |    |         |    +--- com.google.android.gms:play-services-tasks:17.0.0
|    |    |         |    |    \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    +--- com.google.firebase:firebase-common:19.3.0
|    |    |         |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    |         |    |    +--- com.google.auto.value:auto-value-annotations:1.6.5
|    |    |         |    |    \--- com.google.firebase:firebase-components:16.0.0
|    |    |         |    |         \--- androidx.annotation:annotation:1.1.0
|    |    |         |    +--- com.google.firebase:firebase-components:16.0.0 (*)
|    |    |         |    +--- com.google.firebase:firebase-iid:20.1.5
|    |    |         |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    |    |         |    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    |         |    |    +--- com.google.firebase:firebase-common:19.3.0 (*)
|    |    |         |    |    +--- com.google.firebase:firebase-components:16.0.0 (*)
|    |    |         |    |    +--- com.google.firebase:firebase-iid-interop:17.0.0
|    |    |         |    |    |    +--- com.google.android.gms:play-services-base:17.0.0
|    |    |         |    |    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    |    |    +--- androidx.fragment:fragment:1.0.0 -> 1.1.0 (*)
|    |    |         |    |    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    |    |    \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    |         |    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         |    |    +--- com.google.firebase:firebase-installations:16.2.1
|    |    |         |    |    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    |         |    |    |    +--- com.google.firebase:firebase-common:19.3.0 (*)
|    |    |         |    |    |    +--- com.google.firebase:firebase-components:16.0.0 (*)
|    |    |         |    |    |    \--- com.google.firebase:firebase-installations-interop:16.0.0
|    |    |         |    |    |         \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    |         |    |    \--- com.google.firebase:firebase-installations-interop:16.0.0 (*)
|    |    |         |    \--- com.google.firebase:firebase-measurement-connector:18.0.0
|    |    |         |         \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |         \--- com.google.android.gms:play-services-measurement-sdk:17.4.1
|    |    |              +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |              +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |              +--- com.google.android.gms:play-services-measurement-base:[17.4.1] -> 17.4.1 (*)
|    |    |              \--- com.google.android.gms:play-services-measurement-impl:[17.4.1] -> 17.4.1 (*)
|    |    \--- androidx.annotation:annotation:1.1.0
|    +--- io.flutter:flutter_embedding_debug:1.0.0-5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec (*)
|    +--- com.google.firebase:firebase-bom:25.3.1 (*)
|    +--- com.google.firebase:firebase-config -> 19.1.4
|    |    +--- com.google.firebase:firebase-abt:19.0.1
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |    +--- com.google.firebase:firebase-common:19.3.0 (*)
|    |    |    +--- com.google.firebase:firebase-components:16.0.0 (*)
|    |    |    +--- com.google.firebase:firebase-measurement-connector:18.0.0 (*)
|    |    |    \--- com.google.protobuf:protobuf-lite:3.0.1
|    |    +--- com.google.firebase:firebase-common:19.3.0 (*)
|    |    +--- com.google.firebase:firebase-components:16.0.0 (*)
|    |    +--- com.google.firebase:firebase-iid:20.1.5 (*)
|    |    +--- com.google.firebase:firebase-measurement-connector:18.0.0 (*)
|    |    \--- com.google.protobuf:protobuf-lite:3.0.1
|    \--- androidx.annotation:annotation:1.1.0
\--- project :firebase_core (*)


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 1.22.0, on Mac OS X 10.15.6 19G2021, locale en-NL)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Community Edition (version 2019.3.5)
[✓] VS Code (version 1.49.3)


Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand

```
Dart SDK 2.10.0
Flutter SDK 1.22.0
firebase_repo 1.0.0+1

dependencies:

  • cupertino_icons 1.0.0
  • firebase_remote_config 0.4.0+2 [flutter firebase_core]
  • flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]

dev dependencies:

  • flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:

  • async 2.5.0-nullsafety.1 [collection]
  • boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
  • characters 1.1.0-nullsafety.3
  • charcode 1.2.0-nullsafety.1
  • clock 1.1.0-nullsafety.1
  • collection 1.15.0-nullsafety.3
  • fake_async 1.2.0-nullsafety.1 [clock collection]
  • firebase 7.3.0 [http http_parser js]
  • firebase_core 0.5.0+1 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
  • firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver]
  • firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js]
  • flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
  • http 0.12.2 [http_parser path pedantic]
  • http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
  • js 0.6.2
  • matcher 0.12.10-nullsafety.1 [stack_trace]
  • meta 1.3.0-nullsafety.3
  • path 1.8.0-nullsafety.1
  • pedantic 1.9.2 [meta]
  • plugin_platform_interface 1.0.3 [meta]
  • quiver 2.1.3 [matcher meta]
  • sky_engine 0.0.99
  • source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
  • stack_trace 1.10.0-nullsafety.1 [path]
  • stream_channel 2.1.0-nullsafety.1 [async]
  • string_scanner 1.1.0-nullsafety.1 [charcode source_span]
  • term_glyph 1.2.0-nullsafety.1
  • test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
  • typed_data 1.3.0-nullsafety.3 [collection]
  • vector_math 2.1.0-nullsafety.3```


remote_config bug

Most helpful comment

I found a possible workaround that works for me. Add this to the build.gradle of your app.

subprojects {
    project.evaluationDependsOn(':app')
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.google.protobuf'
                    && details.requested.name.contains('protobuf-lite') ) {
                details.useTarget group: details.requested.group, name: 'protobuf-javalite', version:'3.13.0'
            }
        }
    }
}

All 7 comments

I do see an older version of protobuf for remote_config and firebase_core. I am on latest stable.

Screenshot 2020-10-13 at 5 26 53 PM

Screenshot 2020-10-13 at 5 28 08 PM


flutter doctor -v

[✓] Flutter (Channel stable, 1.22.1, on Mac OS X 10.15.4 19E2269, locale en-IN)
    • Flutter version 1.22.1 at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision f30b7f4db9 (5 days ago), 2020-10-08 10:06:30 -0700
    • Engine revision 75bef9f6c8
    • Dart version 2.10.1


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.11.0

[✓] Connected device (1 available)
    • iPhone SE (2nd generation) (mobile) • 6C85835D-FBFD-4AB3-8DE8-B4FAD35E5367
      • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

• No issues found!

I am having the exact same issue. Is there a workaround for this now?

I found a possible workaround that works for me. Add this to the build.gradle of your app.

subprojects {
    project.evaluationDependsOn(':app')
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.google.protobuf'
                    && details.requested.name.contains('protobuf-lite') ) {
                details.useTarget group: details.requested.group, name: 'protobuf-javalite', version:'3.13.0'
            }
        }
    }
}

Thanks for the solution @remonh87.

Closing for now, unless anything else is needed.

@dackers86 I still would like to see that the protobuf will be upgraded. For our library Reactive ble we were forced to downgrade the protobuf version because of collisions with firebase remote config.

I found a possible workaround that works for me. Add this to the build.gradle of your app.

subprojects {
    project.evaluationDependsOn(':app')
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.google.protobuf'
                    && details.requested.name.contains('protobuf-lite') ) {
                details.useTarget group: details.requested.group, name: 'protobuf-javalite', version:'3.13.0'
            }
        }
    }
}

This workaround doesn't work in my case because it conflicts with another project (barcode_reader). Please don't close this issue until it's resolved since I can't use this project currently at all.

Was this page helpful?
0 / 5 - 0 ratings