حل مشكلة
Plugin [id: 'com.android.library', version: '1.7.10', apply: false] was not found in any of the following sources
في android studio
قم تجربتة هذا الحل.
في ملف settings.gradle، قمت بتعليق الكود التالي:
/*pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}*/
وفي ملف build.gradle في الدليل الرئيسي للمشروع، عدل buildScript كما يلي:
buildscript {
ext {
kotlin_version = '1.6.10'
compose_version = '1.0.5'
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:7.1.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
بعد ذلك، قم بتنفيذ الأمر clean لإزالة أي بقايا من البناء السابق، ثم قمت بإعادة بناء المشروع.
التعليقات