Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
918 stars 207 forks source link

Error launching in Flutter 3.7.0 #221

Closed WiRight closed 1 year ago

WiRight commented 1 year ago

Steps to Reproduce

Upgrading Flutter to 3.7.0 and run app

Getting in console

e: /Users/wiright/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.0/android/src/main/kotlin/com/apparence/camerawesome/cameraX/CameraPermissions.kt: (175, 22): Not enough information to infer type variable T
e: /Users/wiright/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.0/android/src/main/kotlin/com/apparence/camerawesome/cameraX/CameraPermissions.kt: (175, 41): Cannot infer a type for this parameter. Please specify it explicitly.

Expected results

App is running

Actual results

Getting error in console

About your device

Brand Model OS
Apple MacBook Pro M1 13.1 (22C65)
Google Android emulator 13
flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-arm64, locale ru-RU) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.74.3) [✓] Connected device (4 available) [✓] HTTP Host Availability • No issues found!
apalala-dev commented 1 year ago

I cannot reproduce the issue, I upgraded to Flutter 3.7 and launched CamerAwesome from the master channel (1.2.0) and it seems to work. I tried both on Android emulator with API 29 and 33.

Are you using camerawesome 1.2.0 ?

You might try a flutter clean to see if it helps.

Here is my flutter doctor output:

flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.7.0, on macOS 13.0.1 22A400 darwin-x64, locale en-FR) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2) [✓] Xcode - develop for iOS and macOS (Xcode 14.1) [✓] Chrome - develop for the web [!] Android Studio ✗ Unable to find bundled Java version. [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.74.3) [✓] Connected device (3 available) [✓] HTTP Host Availability
WiRight commented 1 year ago

Yeah, I using camerawesome 1.2.0 and make clear for all builds

image

Note: deps commented for testing

Maybe need clear all caches... I will try and come back with the result

WiRight commented 1 year ago

Fully removing $USER/.pub-cache and still getting error

See screenshot

image
text representation Launching lib/main.dart on Pixel 3 in debug mode... Running Gradle task 'assembleDebug'... e: /Users/wiright/.pub-cache/hosted/pub.dev/camerawesome-1.2.0/android/src/main/kotlin/com/apparence/camerawesome/cameraX/CameraPermissions.kt: (175, 22): Not enough information to infer type variable T e: /Users/wiright/.pub-cache/hosted/pub.dev/camerawesome-1.2.0/android/src/main/kotlin/com/apparence/camerawesome/cameraX/CameraPermissions.kt: (175, 41): Cannot infer a type for this parameter. Please specify it explicitly. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':camerawesome: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 19s Running Gradle task 'assembleDebug'... 20,8s Exception: Gradle task assembleDebug failed with exit code 1
WiRight commented 1 year ago

New update

I created new project by flutter create ex1, add dependency camerawesome: ^1.2.0 and it works!

Closing cause no error in new project Thanks!

WiRight commented 1 year ago

Found my error, maybe it be useful

Upgrade in build.gradle kotlin version to ext.kotlin_version = '1.7.10' And classpath 'com.android.tools.build:gradle:7.2.0'