pinkfish / flutter_rtmppublisher

Publisher to rtmp using the camera plugin as a basis to do all the basic camera/record management.
BSD 3-Clause "New" or "Revised" License
95 stars 126 forks source link

Build Issue when using a component but working when running it from source #30

Open vikramjb opened 4 years ago

vikramjb commented 4 years ago

I am getting the below issue when I use the camera_with_rtmp as a component. However when I run the example given in the github folder, it seems to be working without issue. I'd appreciate some help. This working yesterday and suddenly it stopped working.

Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib\main.dart on Android SDK built for x86 in debug mode... ../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart:81:49: Error: 'await' can only be used in 'async' or 'async*' methods. final List<Map<dynamic, dynamic>> cameras = await _channel ^^^^^ ../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart:89:8: Error: A value of type 'List' can't be assigned to a variable of type 'Future<List>'.

FAILURE: Build failed with an exception.

BUILD FAILED in 14s Running Gradle task 'assembleDebug'... Running Gradle task 'assembleDebug'... Done 15.6s Exception: Gradle task assembleDebug failed with exit code 1

vikramjb commented 4 years ago

I am able to bypass this error by directly referring to the project when doing flutter run. The issue most likely seems to be something related to kotlin or other dependencies. Not sure what.