LeGoffMael / video_editor

A flutter package for editing video written in pure Dart with fully customizable UI. Supports crop, trim, rotation and cover selection.

Home Page:https://pub.dev/packages/video_editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I initialize the example project with this envirnment?

dhx-worker opened this issue · comments

flutter doctor --verbose

[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [版本 10.0.19045.3324], locale zh-CN)
    • Flutter version 3.10.6 on channel stable at C:\Users\wei\Desktop\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (10 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[√] 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 C:\Users\wei\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\as\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)    
    • All Android licenses accepted.

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

[√] Visual Studio - develop for Windows (Visual Studio 生成工具 2019 16.11.26)       
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio 生成工具 2019 version 16.11.33529.622
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • Android Studio at D:\as
    • 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.6+0-b2043.56-10027231)

[√] VS Code (version 1.81.1)
    • VS Code at C:\Users\wei\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.72.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.19045.3324]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 116.0.5845.188
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 117.0.2045.31

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

• No issues found!

java version :

Java15

/path/to/project/example/android/gradle/wrapper/gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

/path/to/project/example/android/build.gradle

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

then run /path/to/project/example by use AndroidStudio with an error occurred! :

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

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\wei\Desktop\�½��ļ���\video_editor\example\android\settings.gradle' (C:\Users\wei\.gradle\caches\7.0.2\scripts\1mfgee3p4vadd9ws314yxiovt).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61

* 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 3s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using    │
│ for Gradle.                                                                                      │
│                                                                                                  │
│ To fix this issue, first, check the Java version used by Flutter by running `flutter doctor      │
│ --verbose`.                                                                                      │
│                                                                                                  │
│ Then, update the Gradle version specified in                                                     │
│ C:\Users\wei\Desktop\新建文件夹\video_editor\example\android\gradle\wrapper\gradle-wrapper.properties │
│ to be compatible with that Java version. See the link below for more information on compatible   │
│ Java/Gradle versions:                                                                            │
│ https://docs.gradle.org/current/userguide/compatibility.html#java                                │
│                                                                                                  │
│                                                                                                  │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘

If you want to help me discuss and solve my problem after seeing it, please leave comment below. ThANKs your kindness!

It seems you're using a Java version not supported by the Gradle release.
More info on how to fix it there -> https://stackoverflow.com/questions/75651945/bug-exception-in-phase-semantic-analysis-in-source-unit-buildscript-unsup