Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Firebase Core]: Android Build failing with latest Flutter SDK 3.24.3 and latest packages 3.4.1 #13334

Open
1 task done
dgurudot opened this issue Sep 14, 2024 · 7 comments
Open
1 task done
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. type: bug Something isn't working

Comments

@dgurudot
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Core

Which platforms are affected?

Android

Description

During compile, I get the following errors and this is happening only after upgrade to latest SDK and latest flutter.
I did "flutter clean", "invalidated caches from Android Studio", looked at possible solutions but not able to resolve it.

/Users/vk/.pub-cache/hosted/pub.dev/cloud_firestore-5.4.1/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreRegistrar.java:19: error: cannot find symbol
LibraryVersionComponent.create(BuildConfig.LIBRARY_NAME, BuildConfig.LIBRARY_VERSION));
^
symbol: variable BuildConfig
location: class FlutterFirebaseFirestoreRegistrar
/Users/vk/.pub-cache/hosted/pub.dev/cloud_firestore-5.4.1/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreRegistrar.java:19: error: cannot find symbol
LibraryVersionComponent.create(BuildConfig.LIBRARY_NAME, BuildConfig.LIBRARY_VERSION));
^
symbol: variable BuildConfig
location: class FlutterFirebaseFirestoreRegistrar
2 errors

FAILURE: Build failed with an exception.

==========

Sharing Flutter info:

flutter --version
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2663184aa7 (3 days ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3

Reproducing the issue

It's a compile of the simple app with the latest flutter SDK and Firebase libs.

Kindly respond if the error shared is not enough and I will try to create a minimal app and share it here.

Firebase Core version

^3.4.1

Flutter Version

3.24.3

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
  firebase_analytics: ^11.3.1
  firebase_auth: ^5.2.1
  firebase_auth_web: ^5.13.0
  firebase_core: ^3.4.1
  firebase_crashlytics: ^4.1.1
  firebase_messaging: ^15.1.1
  firebase_storage: ^12.3.0
  flutter_archive: ^6.0.3
  flutter_credit_card: ^4.0.1
  flutter_device_type: ^0.4.0
  flutter_inappwebview: ^6.0.0
  flutter_expandable_table: ^2.1.0
  flutter_jailbreak_detection: ^1.10.0
  flutter_local_notifications: ^17.2.2
  flutter_mailer: ^2.1.2
  flutter_markdown: ^0.7.3+1
  flutter_pw_validator: ^1.6.0
  flutter_riverpod: ^2.5.1
  flutter_slidable: ^3.1.1
  flutter_spinkit: ^5.2.1
  flutter_staggered_grid_view: ^0.7.0
  flutter_svg: ^2.0.10+1
  flutter_webview_plugin:

Additional context and comments

No Additional context

@dgurudot dgurudot added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 14, 2024
@dgurudot dgurudot changed the title [PLUGIN_NAME_HERE]: Build failing with latest Flutter SDK and latest packages [PLUGIN_NAME_HERE]: Build failing with latest Flutter SDK 3.24.3 and latest packages 3.4.1 Sep 14, 2024
@dgurudot dgurudot changed the title [PLUGIN_NAME_HERE]: Build failing with latest Flutter SDK 3.24.3 and latest packages 3.4.1 [Firebase Core]: Build failing with latest Flutter SDK 3.24.3 and latest packages 3.4.1 Sep 14, 2024
@dgurudot dgurudot changed the title [Firebase Core]: Build failing with latest Flutter SDK 3.24.3 and latest packages 3.4.1 [Firebase Core]: Android Build failing with latest Flutter SDK 3.24.3 and latest packages 3.4.1 Sep 14, 2024
@dgurudot
Copy link
Author

If I simply downgrade the Flutter SDK then compile works beautifully.

flutter --version
Flutter 3.22.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0850beeb2 (8 weeks ago) • 2024-07-16 21:43:41 -0700
Engine • revision 235db911ba
Tools • Dart 3.4.4 • DevTools 2.34.3

@dgurudot
Copy link
Author

You have to use "flutter build apk" to see this issue.

@SelaseKay
Copy link
Contributor

I’m unable to reproduce the issue. Please share the Firebase dependencies and their versions that are causing the issue.

@SelaseKay SelaseKay added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Sep 16, 2024
@dgurudot
Copy link
Author

Let me go back to latest SDK and then try to re-create using some minimal app to share. I was hoping the error message gives you an indication what could be wrong by looking at code.

@google-oss-bot google-oss-bot removed the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Sep 19, 2024
@SelaseKay
Copy link
Contributor

I tried building an apk with your specified flutter version and it worked fine on my end.

@SelaseKay SelaseKay added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Sep 19, 2024
@SangeetaSinghDev
Copy link

SangeetaSinghDev commented Sep 19, 2024

Hi @dgurudot @SelaseKay ,
I'm still having issue, after downgrade the flutter version-
Flutter 3.22.3 • channel [user-branch] • unknown source
Framework • revision b0850beeb2 (9 weeks ago) • 2024-07-16 21:43:41 -0700
Engine • revision 235db911ba
Tools • Dart 3.4.4 • DevTools 2.34.3

and there is firebase plugins version -
firebase_core: ^3.5.0 # Use a version that's compatible with other packages
firebase_auth: ^4.1.0 # Adjust this to be compatible with firebase_core
cloud_firestore: ^4.5.0 # Choose a version that works with firebase_core
firebase_storage: ^11.0.0 # Choose a compatible version
firebase_messaging: ^14.0.0 # Adjust to a compatible version

Should i change the Android sdk version or what.
while running on android or build an apk then i'm getting that issue -
Error -
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:12: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.BasicMessageChannel;
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:13: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.BinaryMessenger;
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:14: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MessageCodec;
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:15: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.StandardMessageCodec;
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:516: error: cannot find symbol
private static class FirebaseCoreHostApiCodec extends StandardMessageCodec {
^
symbol: class StandardMessageCodec
location: class GeneratedAndroidFirebaseCore
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:560: error: cannot find symbol
static @nonnull MessageCodec getCodec() {
^
symbol: class MessageCodec
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:567: error: cannot find symbol
static void setup(@nonnull BinaryMessenger binaryMessenger, @nullable FirebaseCoreHostApi api) {
^
symbol: class BinaryMessenger
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:672: error: cannot find symbol
static @nonnull MessageCodec getCodec() {
^
symbol: class MessageCodec
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:678: error: cannot find symbol
static void setup(@nonnull BinaryMessenger binaryMessenger, @nullable FirebaseAppHostApi api) {
^
symbol: class BinaryMessenger
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:16: error: package io.flutter.embedding.engine.plugins does not exist
import io.flutter.embedding.engine.plugins.FlutterPlugin;
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:28: error: cannot find symbol
implements FlutterPlugin,
^
symbol: class FlutterPlugin
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:37: error: cannot find symbol
public void onAttachedToEngine(FlutterPluginBinding binding) {
^
symbol: class FlutterPluginBinding
location: class FlutterFirebaseCorePlugin
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:44: error: cannot find symbol
public void onDetachedFromEngine(@nonnull FlutterPluginBinding binding) {
^
symbol: class FlutterPluginBinding
location: class FlutterFirebaseCorePlugin
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:521: error: method does not override or implement a method from a supertype
@OverRide
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:525: error: cannot find symbol
return PigeonFirebaseOptions.fromList((ArrayList) readValue(buffer));
^
symbol: method readValue(ByteBuffer)
location: class FirebaseCoreHostApiCodec
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:527: error: cannot find symbol
return PigeonInitializeResponse.fromList((ArrayList) readValue(buffer));
^
symbol: method readValue(ByteBuffer)
location: class FirebaseCoreHostApiCodec
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:529: error: non-static variable super cannot be referenced from a static context
return super.readValueOfType(type, buffer);
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:529: error: cannot find symbol
return super.readValueOfType(type, buffer);
^
symbol: method readValueOfType(byte,ByteBuffer)
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:533: error: method does not override or implement a method from a supertype
@OverRide
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:542: error: non-static variable super cannot be referenced from a static context
super.writeValue(stream, value);
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:542: error: cannot find symbol
super.writeValue(stream, value);
^
symbol: method writeValue(ByteArrayOutputStream,Object)
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:569: error: cannot find symbol
BasicMessageChannel channel =
^
symbol: class BasicMessageChannel
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:570: error: cannot find symbol
new BasicMessageChannel<>(
^
symbol: class BasicMessageChannel
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:601: error: cannot find symbol
BasicMessageChannel channel =
^
symbol: class BasicMessageChannel
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:602: error: cannot find symbol
new BasicMessageChannel<>(
^
symbol: class BasicMessageChannel
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:630: error: cannot find symbol
BasicMessageChannel channel =
^
symbol: class BasicMessageChannel
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:631: error: cannot find symbol
new BasicMessageChannel<>(
^
symbol: class BasicMessageChannel
location: interface FirebaseCoreHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:673: error: cannot find symbol
return new StandardMessageCodec();
^
symbol: class StandardMessageCodec
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:680: error: cannot find symbol
BasicMessageChannel channel =
^
symbol: class BasicMessageChannel
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:681: error: cannot find symbol
new BasicMessageChannel<>(
^
symbol: class BasicMessageChannel
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:712: error: cannot find symbol
BasicMessageChannel channel =
^
symbol: class BasicMessageChannel
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:713: error: cannot find symbol
new BasicMessageChannel<>(
^
symbol: class BasicMessageChannel
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:744: error: cannot find symbol
BasicMessageChannel channel =
^
symbol: class BasicMessageChannel
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java:745: error: cannot find symbol
new BasicMessageChannel<>(
^
symbol: class BasicMessageChannel
location: interface FirebaseAppHostApi
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:36: error: method does not override or implement a method from a supertype
@OverRide
^
/Users/sangeetasingh/.pub-cache/hosted/pub.dev/firebase_core-3.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:43: error: method does not override or implement a method from a supertype
@OverRide
^
36 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

@SangeetaSinghDev
Copy link

@dgurudot @SelaseKay @daikini please help me to resolve this issue, Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants