HelpDesk

HelpDesk Support System

DTLive - Flutter App (Android - iOS - Website ) Movies - TV Series - Live TV - OTT - Admin Panel

Q:

Execution failed for task ':flutter_cast_video:compileReleaseKotlin'

Closed public

andyuzor@Olumurphys-MacBook-Pro YourAppName % flutter build apk


Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 257628 to 1752 bytes (99.3% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.

Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 4044 bytes (99.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.

warning: [options] source value 8 is obsolete and will be removed in a future release

warning: [options] target value 8 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

3 warnings

warning: [options] source value 8 is obsolete and will be removed in a future release

warning: [options] target value 8 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

3 warnings

warning: [options] source value 8 is obsolete and will be removed in a future release

warning: [options] target value 8 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

3 warnings


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':flutter_cast_video:compileReleaseKotlin'.

> Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (1.8) and 'compileReleaseKotlin' (21).


  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain

  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 


* 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 1m 8s

Running Gradle task 'assembleRelease'...                           69.5s

Gradle task assembleRelease failed with exit code 1


Please help see to the error bolded above I have been on it for over 3days now!


The error is to build debug apk.

All Replies

Viewing 25 to 28 of total 34 topics

Hi,

Please follow the steps below and check again:

Steps:

  1. Open android/gradle/wrapper/gradle-wrapper.properties.

  2. Update the distributionUrl to a newer version of Gradle that supports Java 17. For example:

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

    Gradle 7.3 and higher support Java 17. You can check for newer Gradle versions on the official Gradle releases page.

Regards,
Mr. Priyank

/Users/andyuzor/FlutterDev/flutter/bin/flutter --no-color build apk


Running Gradle task 'assembleRelease'...                        


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':gradle:compileGroovy'.

> BUG! exception in phase 'semantic analysis' in source unit '/Users/andyuzor/FlutterDev/flutter/packages/flutter_tools/gradle/src/main/groovy/app_plugin_loader.groovy' Unsupported class file major version 65


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

Running Gradle task 'assembleRelease'...                            7.7s


┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────┐

│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using   │

│ for Gradle.                                                                                     │

│                                                                                                 │

│ If you recently upgraded Android Studio, consult the migration guide at                         │

│ docs.flutter.dev/go/android-java-gradle-error.                                                  │

│                                                                                                 │

│ Otherwise, to fix this issue, first, check the Java version used by Flutter by running `flutter │

│ doctor --verbose`.                                                                              │

│                                                                                                 │

│ Then, update the Gradle version specified in /Users/andyuzor/Downloads/PROSPAVIEW SCRIPT        │

│ FILES/Mainfiles_1.6/Appcode/YourAppName/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                               │

│                                                                                                 │

│                                                                                                 │

└─────────────────────────────────────────────────────────────────────────────────────────────────┘

Gradle task assembleRelease failed with exit code 1

Process finished with exit code 1

My latest release report

Okay thank you!

Let me try.

Hi,

Please follow the steps below and check again:


The error you're seeing about not being able to open the cp_settings generic class cache for your Gradle settings file might be caused by a corrupted Gradle cache or configuration issue. Here's how you can resolve it:

Steps to Resolve the Issue:

  1. Clean Gradle Cache: Corrupt Gradle caches are a common cause for errors like this. You can force Gradle to rebuild the caches by deleting the ~/.gradle directory.

    • Delete the .gradle folder located at Users/your_username/.gradle. You can run the following command in the terminal:
      rm -rf ~/.gradle/caches
    • After deleting the cache, rebuild your project in Android Studio. Gradle will automatically regenerate the necessary files.
  2. Invalidate Android Studio Cache and Restart: Sometimes, the issue can be due to Android Studio's own cached data.

    • In Android Studio, go to File -> Invalidate Caches / Restart.
    • Select Invalidate and Restart. This will clear the cache and restart Android Studio.
  3. Check Permissions: Ensure that there are no permission issues for the directory where your .gradle cache is stored. If there are permission problems, you can change the directory permissions:

    • Run the following command in the terminal to ensure the current user has full access:
      sudo chown -R $(whoami) ~/.gradle
  4. Upgrade Gradle Version: If the issue persists, try updating your Gradle version. Open android/gradle/wrapper/gradle-wrapper.properties and change the distributionUrl to the latest version (e.g., 7.5.1):

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

    Then sync the project.

  5. Run Gradle with Debug Output: If the issue still isn't resolved, you can run Gradle with more verbose output to get more details:

    ./gradlew --debug

    This might help pinpoint the exact cause of the error.

After trying these steps, you should be able to resolve the cache issue and proceed with building your project. Let me know if the issue persists!

Thank you!

Regards,
Mr. Priyank

Viewing 25 to 28 of total 34 topics

Support is Online

Office hours

Monday - Friday
10:00 AM - 06:00 PM
IST (GMT +5:30)

  • Office time

    00:00:00 AM

  • Your time

    00:00:0 AM

Explore Our Support Documentation

Whether you're troubleshooting an issue or looking for step-by-step guidance, our resources are designed to empower you with the knowledge you need