dyte-io / flutter-samples

0 stars 2 forks source link

error: Execution failed for task ':dyte_core_android:compileDebugKotlin' #11

Closed eunseoDev closed 5 months ago

eunseoDev commented 5 months ago

Hello, I tried running flutter_core in the flutter-sample project and encountered the following errors. The errors occurred in my project, and I couldn't determine the problem, so I tried running the dyte_core version 0.3.0 to 0.3.5 in the sample, and the same errors appeared.

My Java version is 21, and I've modified the compileSdkVersion from 33 to 34. I've also tried updating ext.kotlin_version to the latest versions, 1.9.3 or 1.9.0.

Additionally, it seems that the Flutter page documentation is outdated, and the YouTube tutorials are also based on older versions, so they weren't helpful.

If there are any specific details or further information you need, please let me know.

I don't have a place to discuss, so I'm posting this in issue page. Sorry!


User
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/FlutterCorePlugin.kt:7:29 Unresolved reference: DytePluginViewFactory
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/FlutterCorePlugin.kt:8:29 Unresolved reference: DyteScreenshareViewFactory
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/FlutterCorePlugin.kt:9:29 Unresolved reference: DyteVideoViewFactory
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/FlutterCorePlugin.kt:108:13 Unresolved reference: DyteVideoViewFactory
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/FlutterCorePlugin.kt:114:13 Unresolved reference: DyteScreenshareViewFactory
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/FlutterCorePlugin.kt:118:13 Unresolved reference: DytePluginViewFactory
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/methodChannels/FlutterCoreMethodChannelHandler.kt:7:24 Unresolved reference: ChatFileDownloader
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/methodChannels/FlutterCoreMethodChannelHandler.kt:637:16 Unresolved reference: ChatFileDownloader
e: file:///Users/eunseo/.pub-cache/hosted/pub.dev/dyte_core_android-0.3.5/android/src/main/kotlin/io/dyte/flutter/view/videoview/VideoViewController.kt:11:69 Unresolved reference: DyteVideoView

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dyte_core_android:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > 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 8s
Error: Gradle task assembleDebug failed with exit code 1

스크린샷 2024-04-19 오후 3 07 56

saksham-gt commented 5 months ago

Hey @eunseoDev,

Can you try migrating it to 1.9.0 kotlin version, setting minSdkVersion to 21 and then run flutter clean -> flutter pub get -> flutter run? Also, please post the output for flutter doctor -v.

eunseoDev commented 5 months ago

thank you!! @saksham-gt ,

this is flutter doctor -v output

[✓] Flutter (Channel stable, 3.19.6, on macOS 14.3 23D56 darwin-arm64, locale ko-KR)
    • Flutter version 3.19.6 on channel stable at /Users/eunseo/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (2 days ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/eunseo/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (3 available)
    • SM G991N (mobile) • R3CR40H6P1M • android-arm64  • Android 14 (API 34)
    • macOS (desktop)   • macos       • darwin-arm64   • macOS 14.3 23D56 darwin-arm64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 124.0.6367.60

[✓] Network resources
    • All expected network resources are available.

• No issues found!

setting should be minSdkVersion 21?? other dependency's minSdkVersion should be 23...🥹

The build succeeded when I downgraded the Java version and set the minSdkVersion to 23. I will run a few more tests and let you know the results. Thank you!

saksham-gt commented 5 months ago

That's great, closing this issue now since it's resolved. Feel free to reopen it if required! :)