حل ارور licenses Android SDK در VS Code

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

Using Android SDK: C:\Users\Bessi\AppData\Local\Android\sdk

  • 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

Running Gradle task ‘assembleDebug’…
Running Gradle task ‘assembleDebug’… Done 155.0s (!)
Exception: Gradle task assembleDebug failed with exit code 1


دوستان عزیزم بعد ازنصب فلاتر با ارور بالا مواجه شدم. و بعد از ساعتها سرچ و جستجو متوجه شدم بعد از دانلود sdk android یه پوشه به نام license در کنار اونها باید باشه تا به این ارور برنخورید.

من هرچی سرچ کردم تا به امروز کسی روشی برای vs code نذاشته بود. برا همین گفتم برای اندروید استودیو چک کنم تا ببینم نتیجه ای هست یا نه؛ بله بود. اما من اول پیشنهاد میکنم برید تو آدرس محل sdk ، کنار فایلها یه پوشه به نام licenses باز کنید. یه فایل txt ایجاد کنید و نامش رو android-sdk-license بذارید. داخلش هم لایسنس زیر رو کپی کنید : 24333f8a63b6825ea9c5514f83c2829b004d1fee

اگر خدا نکرده این روش جواب نداد، باز دوتا پیشنهاد دارم:

1- اگه هنوز فایلSDK اندروید رو دانلود نکردید، کامنت بذارید تا براتون آپلود کنم و از اینهمه مشقت رهایی یابید.

2- اگه فایل sdk ر دان کردید و اندروید استودیو رو رو سیستمتون نصب ارید، به راحتی میتونید این مشکل رو حل کنید. ویدیو رو از این لینک دانلود کنید.

وجدانا اگه به دردتون خورد کامنت بذارید منم انگیزه بگیرم واسه ادامه کار.

حل ارور gradle در vscode

PS D:\Projects\Flutter\helloflutter> flutter run
Launching lib\main.dart on 192.168.149.101:5555 in debug mode…

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not find com.android.tools.build:gradle:3.5.0.
Searched in the following locations:
– https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
– https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
– https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
– https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
Required by:
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 12s
Running Gradle task ‘assembleDebug’…
Running Gradle task ‘assembleDebug’… Done 14.8s
Exception: Gradle task assembleDebug failed with exit code 1


ویدیو آموزش نصب gradle روی ویندوز رو میتونید از لینک زیر دانلود کنید:

کلیک کنید

حل مشکل flutter : the term ‘flutter’ is not recognized as the name of a cmdlet, function, script file, or operable program. در زبان برنامه نویسی فلاتر

سلام همه برنامه نویسان و علاقه مندان به برنامه نویسی عزیز.

اگر به ارور

fix flutter : the term ‘flutter’ is not recognized as the name of a cmdlet, function, script file, or operable program. check the spelling of the name, or if a path was included, verify that the path is correct and try again. at line:1 char:1 + flutter create helloflutter + ~~~ + categoryinfo : objectnotfound: (flutter:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception

در هنگام اجرای فلاتر در ترمینال به مشکل برخوردید، فایلsdk فلاتر درست path نکردید.

برای حل این مشکل تو قسمت سرچ ویندوز سرچ کنید:

Environment Variables

پنجره بالا که باز شد Environment Variables رو کلیک کنید. حالا روی قسمت path دابل کلیک کنید.

حالا روی فایل فلاتر که آدرس دهی کردید دابل کلیک کنید؛ ادرس sdk باید دقیقا به این شکل باشه.D:\Flutter\flutter\bin

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