۱ مهرداد عامری
عدم اجرای برنامه
جامعه فلاتر ایجاد شده در ۲۷ آبان ۱۴۰۱

سلام و احترام

من حین ران کردن برنامه با ارور زیر مواجه میشم. از شکن استفاده می‌کنم و متصل هست اما بازم این ارور دیده میشه:

ممنون میشم راهنمایی بفرمایید.

FAILURE: Build failed with an exception.

* Where:

Build file '/Users/mehrdadameri/Documents/Codes/Flutter/world_time/android/build.gradle' line: 26

* What went wrong:

A problem occurred evaluating root project 'android'.

> A problem occurred configuring project ':app'.

  > Could not resolve all files for configuration ':app:classpath'.

   > Could not find gradle-4.1.0.jar (com.android.tools.build:gradle:4.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.jar

   > Could not find builder-4.1.0.jar (com.android.tools.build:builder:4.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.1.0/builder-4.1.0.jar

   > Could not find bundletool-0.14.0.jar (com.android.tools.build:bundletool:0.14.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.14.0/bundletool-0.14.0.jar

   > Could not find sdk-common-27.1.0.jar (com.android.tools:sdk-common:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/27.1.0/sdk-common-27.1.0.jar

   > Could not find aapt2-proto-4.1.0-6503028.jar (com.android.tools.build:aapt2-proto:4.1.0-6503028).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/4.1.0-6503028/aapt2-proto-4.1.0-6503028.jar

   > Could not find ddmlib-27.1.0.jar (com.android.tools.ddms:ddmlib:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/27.1.0/ddmlib-27.1.0.jar

   > Could not find sdklib-27.1.0.jar (com.android.tools:sdklib:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/27.1.0/sdklib-27.1.0.jar

   > Could not find layoutlib-api-27.1.0.jar (com.android.tools.layoutlib:layoutlib-api:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/27.1.0/layoutlib-api-27.1.0.jar

   > Could not find dvlib-27.1.0.jar (com.android.tools:dvlib:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/27.1.0/dvlib-27.1.0.jar

   > Could not find repository-27.1.0.jar (com.android.tools:repository:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/repository/27.1.0/repository-27.1.0.jar

   > Could not find shared-27.1.0.jar (com.android.tools.analytics-library:shared:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/27.1.0/shared-27.1.0.jar

   > Could not find common-27.1.0.jar (com.android.tools:common:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/common/27.1.0/common-27.1.0.jar

   > Could not find protos-27.1.0.jar (com.android.tools.analytics-library:protos:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/27.1.0/protos-27.1.0.jar

   > Could not find core-proto-0.0.2-dev.jar (com.google.test.platform:core-proto:0.0.2-dev).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/google/test/platform/core-proto/0.0.2-dev/core-proto-0.0.2-dev.jar

   > Could not find apkzlib-4.1.0.jar (com.android.tools.build:apkzlib:4.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/4.1.0/apkzlib-4.1.0.jar

   > Could not find apksig-4.1.0.jar (com.android.tools.build:apksig:4.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/4.1.0/apksig-4.1.0.jar

   > Could not find annotations-27.1.0.jar (com.android.tools:annotations:27.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/tools/annotations/27.1.0/annotations-27.1.0.jar

   > Could not find databinding-common-4.1.0.jar (androidx.databinding:databinding-common:4.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/4.1.0/databinding-common-4.1.0.jar

   > Could not find baseLibrary-4.1.0.jar (com.android.databinding:baseLibrary:4.1.0).

    Searched in the following locations:

      https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/4.1.0/baseLibrary-4.1.0.jar

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

Exception: Gradle task assembleDebug failed with exit code 1

سلام وقت بخیر

در اولویت اول اگر میخواهید در این شرایط به مشکل نخورید vpn تهیه کنید.

اما راهکارهایی که ممکن هست کمکتون کنه

flutter clean

و سپس

flutter pub upgrade
flutter pub get

البته این نکته هم باید لحاظ کنم از اپدیت بودن gradle مطمئن شید

در وحله اخر اگر نشد کش gradle رو پاک کنید.

متین عفتی ۲۷ آبان ۱۴۰۱، ۲۰:۱۳