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

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

Closed
RemigijusD opened this issue Jun 2, 2023 · 10 comments
Closed

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

RemigijusD opened this issue Jun 2, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@RemigijusD
Copy link

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)?'.

  • 'LocalInvitation' is from 'package:agora_rtm/src/utils.dart' ('/C:/Users/remig/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.1/lib/src/utils.dart').
    (AgoraRtmLocalInvitation invitation) {
    ^
    /C:/Users/remig/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.3/lib/controllers/rtm_client_event_handler.dart:81:7: Error: A value of type 'void Function(LocalInvitation)' can't be assigned to a variable of type 'void Function(LocalInvitation, String)?'.
  • 'LocalInvitation' is from 'package:agora_rtm/src/utils.dart' ('/C:/Users/remig/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.1/lib/src/utils.dart').
    (AgoraRtmLocalInvitation invitation) {
    ^
    Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • 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.

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 :)

@RemigijusD RemigijusD added the bug Something isn't working label Jun 2, 2023
@abeloha
Copy link

abeloha commented Jun 2, 2023

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

@mjmon
Copy link

mjmon commented Jun 3, 2023

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
Copy link

codeyq commented Jun 4, 2023

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

@tadaspetra
Copy link
Contributor

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

@RemigijusD
Copy link
Author

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

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

@ardeshir-33033
Copy link

any updates on this?

@tadaspetra
Copy link
Contributor

It's being tracked in #138

@tadaspetra
Copy link
Contributor

New version has been released. Version 1.3.4

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

@Plorax
Copy link

Plorax commented Jul 25, 2023

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants