fluttercandies / flutter_photo_manager

A Flutter plugin that provides images, videos, and audio abstraction management APIs without interface integration, available on Android, iOS, macOS and OpenHarmony.
https://pub.dev/packages/photo_manager
Apache License 2.0
667 stars 301 forks source link

[Bug report] Stuck on running gradle task #1167

Closed md-rifatkhan closed 1 month ago

md-rifatkhan commented 1 month ago

Version

3.2.2

Platforms

Android

Device Model

Pixel 7

flutter info

[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22635.3936], locale en-US)
    • Flutter version 3.22.1 on channel stable at E:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (9 weeks ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at E:\Android Studios\Android Sdk\Sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.0)
    • Visual Studio at E:\VIsual Studio Environment\VS
    • Visual Studio Community 2022 version 17.8.34309.116
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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.10+0--11609105)

[√] VS Code (version 1.91.1)
    • VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.92.0

[√] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 14 (API 34) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.22635.3936]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 126.0.6478.185
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 127.0.2651.49

How to reproduce?

Stuck on ``` Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... Running Gradle task 'assembleDebug'... when photo_manager: 3.2.2 library is installed


### Logs

_No response_

### Example code (optional)

```Dart
name: example
version: 1.0.0+1
publish_to: none
description: example
environment: 
  sdk: '>=3.4.1 <4.0.0'

dependencies: 
  cupertino_icons: ^1.0.6
  get: 4.6.6
  get_storage: 2.1.1
  reorderable_grid_view: 2.2.8
  photo_manager: 3.2.2
  photo_manager_image_provider: 2.1.1
  flutter: 
    sdk: flutter

dev_dependencies: 
  flutter_lints: ^3.0.0
  flutter_test: 
    sdk: flutter

flutter: 
  uses-material-design: true

Contact

No response

md-rifatkhan commented 1 month ago

Stuck on

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task assembleDebug

when photo_manager: 3.2.2 library is installed

AlexV525 commented 1 month ago
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at E:\Android Studios\Android Sdk\Sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

Your doctor's result tells that you don't have a valid Android setup. Consider solving that first before you make further steps. Also, a long duration with assembleDebug usually means there are something wrong with the network connection to the Gradle dependencies.

md-rifatkhan commented 1 month ago
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at E:\Android Studios\Android Sdk\Sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

Your doctor's result tells that you don't have a valid Android setup. Consider solving that first before you make further steps. Also, a long duration with assembleDebug usually means there are something wrong with the network connection to the Gradle dependencies.

But i dont think something wrong with my setup or network, its run immediately when i remove this library.

AlexV525 commented 1 month ago

We have a workflow to ensure you can build the APK with the code. https://github.com/fluttercandies/flutter_photo_manager/actions/workflows/build-example-apk.yml You can try to run the example of the package and see if it works.

md-rifatkhan commented 1 month ago

We have a workflow to ensure you can build the APK with the code. https://github.com/fluttercandies/flutter_photo_manager/actions/workflows/build-example-apk.yml You can try to run the example of the package and see if it works.

Yeah now worked, thanks for helping