AgoraIO-Community / VideoUIKit-Flutter

Flutter plugin to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
https://agora-flutter-uikit.vercel.app/
MIT License
138 stars 76 forks source link

Cannot build apk file "Null Function(LocalInvitation)" [BUG] #139

Closed RemigijusD closed 1 year ago

RemigijusD commented 1 year ago

While trying to run flutter build apk --release, the process finishes with a problem indicating that there might be an issue with agora rtm_client_event_handler.dart:76:7. I tried to resolve it changing build gradles and kotlin version, but with no success.

To reproduce the bug: have these in the pubspec.yaml: agora_uikit: ^1.3.3 permission_handler: ^10.2.0

try to run flutter build apk --release in the terminal.

Then it the console log output looks like this:

`Running Gradle task 'assembleRelease'...
/C:/Users/remig/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.3/lib/controllers/rtm_client_event_handler.dart:76:7: Error: A value of type 'Null Function(LocalInvitation)' can't be assigned to a variable of type 'dynamic Function(LocalInvitation, String)?'.

FAILURE: Build failed with an exception.

BUILD FAILED in 22s Running Gradle task 'assembleRelease'... 22.9s Gradle task assembleRelease failed with exit code 1`

Additional information: build gradle: classpath 'com.android.tools.build:gradle:7.1.2' wrapper distribution url: distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

Some help or guidance would be appreciated :)

abeloha commented 1 year ago

I am having same issue. Please what is the solution?

mjmon commented 1 year ago

same issue with ios release build

using: agora_uikit: ^1.3.3

error: ../../../.pub-cache/hosted/pub.dev/agora_uikit-1.3.3/lib/controllers/rtm_client_event_handler.dart:76:7: Error: A value of type 'Null Function(LocalInvitation)' can't be assigned to a variable of type 'dynamic Function(LocalInvitation, String)?'.

Looks like it was expecting a string for these two methods, I did fork it and was able to build now but there are some deprecated methods

Screenshot 2023-06-03 at 6 47 39 PM

codeyq commented 1 year ago

+1 on same issue. Could you help take a look? @tadaspetra

tadaspetra commented 1 year ago

We're looking into this. Will push an update soon!

RemigijusD commented 1 year ago

We're looking into this. Will push an update soon!

Thanks @tadaspetra , looking forward to it, ačiū!

ardeshir-33033 commented 1 year ago

any updates on this?

tadaspetra commented 1 year ago

It's being tracked in #138

tadaspetra commented 1 year ago

New version has been released. Version 1.3.4

This should solve the problem. Please reopen if it doesn'

Plorax commented 1 year ago

So 1.3.4 does not resolve the issue because you've now moved to http 1.0.0. Why ? From one issue to another. guys you can't do this, this is bad programming practice. http 1.0.0 is very new and most libs don't use it yet. Its causing issues with my other packages that are not yet compatible with http 1.0.0.

PLease revert the http 1.0.0 upgrade and fix the bug. Its much wiser moving to http 1.0 with agora_uikit 2.0.0 instead of 1.3.4

tadaspetra commented 1 year ago

Version 1.3.5 has just been released with a wider version of http

So 1.3.4 does not resolve the issue because you've now moved to http 1.0.0. Why ? From one issue to another. guys you can't do this, this is bad programming practice. http 1.0.0 is very new and most libs don't use it yet. Its causing issues with my other packages that are not yet compatible with http 1.0.0.

PLease revert the http 1.0.0 upgrade and fix the bug. Its much wiser moving to http 1.0 with agora_uikit 2.0.0 instead of 1.3.4