۶ Babak Hakimimehr
خطا بعد از نصب google font
جامعه فلاتر ایجاد شده در ۰۸ مرداد ۱۴۰۱

سلام

من وقتی گوگل فونت رو نصب میکنم دیگه پروژه run نمیشه و ارور زیر رو میده

ولی به محض اینکه پکیجش رو از فایل pubspec.yaml پاک میکنم و دوباره دکمه ی get package رو میزنم پروژه بدون مشکل run میشه

Launching lib/main.dart on sdk gphone x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':path_provider_android'.
> Could not resolve all files for configuration ':path_provider_android:classpath'.
  > Could not find com.android.tools.build:gradle:3.3.0.
    Searched in the following locations:
      - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
      - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
    Required by:
        project :path_provider_android
> Failed to notify project evaluation listener.
  > Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.
  > Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.
* 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
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

میشه راهنمایی کنید مشکلم چیه؟

سلام مشکل از class path هست و باید نسخه گردل رو برای class path چک کنید


لینک زیرو یه نگاه بندازین


لینک

حامد روشنی ۰۸ مرداد ۱۴۰۱، ۱۴:۵۴

الان این ارور رو میده


FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
  > Could not find repository-30.1.2.jar (com.android.tools:repository:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.1.2/repository-30.1.2.jar
  > Could not find shared-30.1.2.jar (com.android.tools.analytics-library:shared:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/30.1.2/shared-30.1.2.jar
  > Could not find databinding-compiler-common-7.1.2.jar (androidx.databinding:databinding-compiler-common:7.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-compiler-common/7.1.2/databinding-compiler-common-7.1.2.jar
  > Could not find databinding-common-7.1.2.jar (androidx.databinding:databinding-common:7.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/7.1.2/databinding-common-7.1.2.jar
  > Could not find baseLibrary-7.1.2.jar (com.android.databinding:baseLibrary:7.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.1.2/baseLibrary-7.1.2.jar
  > Could not find layoutlib-api-30.1.2.jar (com.android.tools.layoutlib:layoutlib-api:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/30.1.2/layoutlib-api-30.1.2.jar
  > Could not find android-device-provider-ddmlib-proto-30.1.2.jar (com.android.tools.utp:android-device-provider-ddmlib-proto:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-ddmlib-proto/30.1.2/android-device-provider-ddmlib-proto-30.1.2.jar
  > Could not find android-device-provider-gradle-proto-30.1.2.jar (com.android.tools.utp:android-device-provider-gradle-proto:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-gradle-proto/30.1.2/android-device-provider-gradle-proto-30.1.2.jar
  > Could not find android-test-plugin-host-additional-test-output-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-additional-test-output-proto/30.1.2/android-test-plugin-host-additional-test-output-proto-30.1.2.jar
  > Could not find android-test-plugin-host-coverage-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-host-coverage-proto:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-coverage-proto/30.1.2/android-test-plugin-host-coverage-proto-30.1.2.jar
  > Could not find android-test-plugin-host-retention-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-host-retention-proto:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-retention-proto/30.1.2/android-test-plugin-host-retention-proto-30.1.2.jar
  > Could not find android-test-plugin-result-listener-gradle-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-result-listener-gradle-proto/30.1.2/android-test-plugin-result-listener-gradle-proto-30.1.2.jar
  > Could not find builder-model-7.1.2.jar (com.android.tools.build:builder-model:7.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/7.1.2/builder-model-7.1.2.jar
  > Could not find dvlib-30.1.2.jar (com.android.tools:dvlib:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/30.1.2/dvlib-30.1.2.jar
  > Could not find common-30.1.2.jar (com.android.tools:common:30.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/common/30.1.2/common-30.1.2.jar
  > Could not find transform-api-2.0.0-deprecated-use-gradle-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
  > Could not find jetifier-processor-1.0.0-beta09.jar (com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta09/jetifier-processor-1.0.0-beta09.jar
  > Could not find apkzlib-7.1.2.jar (com.android.tools.build:apkzlib:7.1.2).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/7.1.2/apkzlib-7.1.2.jar
  > Could not find jetifier-core-1.0.0-beta09.jar (com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09).
    Searched in the following locations:
        https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta09/jetifier-core-1.0.0-beta09.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 1s
Exception: Gradle task assembleDebug failed with exit code 1
Babak Hakimimehr ۰۸ مرداد ۱۴۰۱، ۱۶:۳۱

این build script منه

buildscript {
   repositories {
       google()
       mavenCentral()
   }
   dependencies {
       /* When bumping, also update ndkVersion above. */
       classpath 'com.android.tools.build:gradle:4.1.0'
   }
}
Babak Hakimimehr ۰۸ مرداد ۱۴۰۱، ۱۶:۳۴

من اون لینک رو دیدم

گفته بودش که ورژن gradle رو آپدیت کنم

gradle من تو مسیر زیر نصب شده که خود اندروید استودیو اینکارو کرد

/home/babak/.gradle/wrapper/dists/gradle-7.4-all/aadb4xli5jkdsnukm30eibyiu/gradle-7.4/bin/

خروجی گرفتم ازش اینو داد

./gradle --version
Welcome to Gradle 7.4!
Here are the highlights of this release:
 - Aggregated test and JaCoCo reports
 - Marking additional test source directories as tests in IntelliJ
 - Support for Adoptium JDKs in Java toolchains
For more details see https://docs.gradle.org/7.4/release-notes.html
------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------
Build time:  2022-02-08 09:58:38 UTC
Revision:    f0d9291c04b90b59445041eaa75b2ee744162586
Kotlin:      1.5.31
Groovy:      3.0.9
Ant:         Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:         11.0.15 (Private Build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1)
OS:          Linux 5.15.0-41-generic amd64

نسخش خیلی قدیمی نیستش آخه

بعد همه ی اینا بعد از نصب google font شروع شد

Babak Hakimimehr ۰۸ مرداد ۱۴۰۱، ۱۷:۰۷

آقا حامد من یه بار فولدرgradel رو پاک کردم تا android studio مجدد فایل هاشو دریافت کنه

هنوزم همون ارور‌ها رو میده

میشه بگید چطوری میشه حلش کرد؟

ممنون

Babak Hakimimehr ۰۸ مرداد ۱۴۰۱، ۲۰:۵۶

سلام

خواستم بگم بعد از اینکه دیدم نمیتونم

هیچ کدوم از این فایل هارو حتی با vpn باز کنم

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


vpn‌های مختلفی رو چک کردم تا تونستم با کمک proton vpn سرور آمریکا بازش کنم

ولی باز ارور میداد

که یه بار دیگه فولدر gradel رو پاک کردم تا android studio مجدد دانلود کنه که بتونه فایل هارو بگیره

و این بار همه چی درست شد

Babak Hakimimehr ۰۸ مرداد ۱۴۰۱، ۲۳:۴۰