janoodleFTW / timy-messenger

Timy - open source mobile app for groups to communicate and organize themselves. Built with flutter.
Apache License 2.0
2.08k stars 464 forks source link

FAILURE: Build failed with an exception. Running Gradle task 'assembleDebug' #32

Closed mike1573 closed 4 years ago

mike1573 commented 4 years ago

Description:

Hi I'm new to Flutter and Dart. I installed the environment as described in the documetation and resolved a a few errors related to;

1) FirebaseStorage unresolved reference:

I've updated the dependencies as follows; Firebase dependencies firebase_core: ^0.4.0+9 firebase_analytics: ^5.0.2 cloud_firestore: ^0.12.9+5 firebase_auth: ^0.14.0+5 google_sign_in: ^4.0.1 firebase_storage: ^3.0.5 firebase_messaging: ^5.1.3 firebase_crashlytics: ^0.1.0+2

2) Execution failed for task ':app:compileDebugKotlin'

Updated the kotlin_version by upgrading to 1.3.50. Resolved some errors, others in the logs remains.

Any assistance or pointing in the right direction would be greatly appreciated. Thanks!

To Reproduce

Steps to reproduce the behavior:

  1. In Android Studion. Go to 'Run,
  2. Click on Run main,dart
  3. Select console window.
  4. See error

Expected behavior

Application should launch on Android emulator

Device Information:

Flutter Information

ΓÇó No issues found!

Logs

C:\flutter\packages\circles_app>flutter run
Using hardware rendering with device Android SDK built for x86. If you get
graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                              1.2s
Resolving dependencies...                                          30.5s
Running Gradle task 'assembleDebug'...
e: C:\flutter\packages\circles_app\android\app\src\main\kotlin\com\example\circl
es_app\UploadPlatform.kt: (15, 36): Unresolved reference: FirebaseStorage

e: C:\flutter\packages\circles_app\android\app\src\main\kotlin\com\example\circl
es_app\UploadPlatform.kt: (16, 36): Unresolved reference: StorageReference

e: C:\flutter\packages\circles_app\android\app\src\main\kotlin\com\example\circl
es_app\UploadPlatform.kt: (298, 19): Unresolved reference: FirebaseStorage

e: C:\flutter\packages\circles_app\android\app\src\main\kotlin\com\example\circl
es_app\UploadPlatform.kt: (333, 13): Unresolved reference: StorageReference

e: C:\flutter\packages\circles_app\android\app\src\main\kotlin\com\example\circl
es_app\UploadPlatform.kt: (334, 28): Cannot infer a type for this parameter. Ple
ase specify it explicitly.

e: C:\flutter\packages\circles_app\android\app\src\main\kotlin\com\example\circl
es_app\UploadPlatform.kt: (342, 57): Cannot infer a type for this parameter. Ple
ase specify it explicitly.

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:compileDebugKotlin'.

> Compilation error. See log for more details

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 27s
Running Gradle task 'assembleDebug'...                             88.4s
Gradle task assembleDebug failed with exit code 1

C:\flutter\packages\circles_app>

Additional context

Add any other context about the problem here.

ThuAbLKA commented 4 years ago

Hi,

Make sure you are using

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

in your project level gradle. if not try with these versions of the dependencies.

firebase_core: ^0.4.0 firebase_analytics: ^5.0.0 cloud_firestore: ^0.12.9 firebase_auth: ^0.14.0 google_sign_in: ^4.0.1 firebase_storage: ^3.0.5 firebase_messaging: ^5.1.3 firebase_crashlytics: ^0.1.0+2

mike1573 commented 4 years ago

Hi,

Make sure you are using

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

in your project level gradle. if not try with these versions of the dependencies.

firebase_core: ^0.4.0 firebase_analytics: ^5.0.0 cloud_firestore: ^0.12.9 firebase_auth: ^0.14.0 google_sign_in: ^4.0.1 firebase_storage: ^3.0.5 firebase_messaging: ^5.1.3 firebase_crashlytics: ^0.1.0+2

Hi ThuAbLKA, I added.... implementation 'com.google.firebase:firebase-storage:19.1.0' in the dependencies under the app\src\build.gradle and it worked for the android app, got everything deployed ok as per the documentation. I'll play with your advised settings to get it done the correct way.

As I tested out the application, all seems to to be working except the user profile button/screen which gave "Bad state: No element" all the way down the screen (red background). Do you know if that should work normally?

Thanks

ThuAbLKA commented 4 years ago

Hi mike1573,

Yes the user profile screen should work. The only crucial feature that is missing is the "no-data" screen. Other than that everything else should work as expected.

mike1573 commented 4 years ago

Thanks ThuAbLKA. I'll dig around on this and come back with a new ticket if I need some help (which should be soon).

Regards