Flutter project fails to build when gradle gets upgraded. Error: Type ‘FlutterTask’ property ‘assets’ is missing an input or output annotation [closed]

When I try to build my application on a usb device, the build crashes displaying this log output

FAILURE: Build failed with an exception.

  • What went wrong: Some problems were found with the configuration of task ‘:app:compileFlutterBuildDebug’ (type ‘FlutterTask’).

  • 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

BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with
exit code 1

Please help to find a solution to this problem


This is happening because you updated gradle in your project to gradle 7. And gradle 7 has some new annotation property which must be reviewed.

I also faced this and filed an issue on github.
This is the link

So the choice you have

  1. Downgrade your gradle( < 7 )
  2. Make changes as mentioned in this PR.

In the referred page(Pull Req) . There is a section named Files Changed. See the green colored lines over there. Just edit your gradle file and add/edit same as green colored lines.


w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

Performing ./gradlew assembleRelease and hit the issue of this. Below shows the entire error log…

> Task :app:mergeDexRelease FAILED
java.nio.file.NoSuchFileException: /Users/path/Desktop/project/android/app/build/intermediates/external_file_lib_dex_archives/release/out
        at java.base/sun.nio.fs.UnixException.translateToIOException(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(
        at java.base/java.nio.file.Files.newDirectoryStream(
        at java.base/java.nio.file.Files.list(
        at org.gradle.workers.internal.AdapterWorkAction.execute(
        at org.gradle.workers.internal.DefaultWorkerServer.execute(
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(
        at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(
        at org.gradle.workers.internal.AbstractWorker$
        at org.gradle.workers.internal.AbstractWorker$
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(
        at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(
        at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(
        at java.base/
        at java.base/java.util.concurrent.Executors$
        at java.base/
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(
        at org.gradle.internal.concurrent.ManagedExecutorImpl$
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.base/java.util.concurrent.ThreadPoolExecutor$
        at org.gradle.internal.concurrent.ThreadFactoryImpl$
        at java.base/

w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDexRelease'.
> A failure occurred while executing$ActionFacade
   > java.nio.file.NoSuchFileException: /Users/path/Desktop/project/android/app/build/intermediates/external_file_lib_dex_archives/release/out

Some story

During the debugging of this “multiple Koltin” issue, I found out that my NDK wasn’t install. Hence I went to SDK Manager and install the NDK (Side by side). Then issue of toolchain occurred, shown as below.

No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

Fixed was done by downloading older NDK version, android-ndk-r19c and pointed the NDK path in my



What I’ve tried

  1. ./gradlew clean && ./gradlew assembleRelease
  2. Appending the following code + Step 1
# FILE 1:
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# FILE 2: app/build.gradle ( under android{} )
dexOptions {
        incremental true
        javaMaxHeapSize "4g"

My project env

react: 16.13.1 => 16.13.1 
react-native: 0.63.2 => 0.63.2

My Project Structure enter image description here enter image description here

Any idea what causes this issue and how to fix this? 🆘


UNBELIEVABLE FIXED, seems to be a 63.x issue? As there’s another person having this issue after upgrading from 62.2 to 63.3

The fixed was done as suggested here

Solved this issue by deleting the .gradle folder from /android and again run npm run android, and it solved this error.

Source: stackoverflow
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Privacy Policy, and Copyright Policy. Content is available under CC BY-SA 3.0 unless otherwise noted. The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 © No Copyrights, All Questions are retrived from public domain..