Running first Kotlin example in Android Studio with failure - android-studio

I am new to Android development and created my first Android Studio project (Empty Activity type).
However when I am presented with the following error message:
5:09 PM Gradle sync failed: Plugin [id: 'org.jetbrains.kotlin.android', version: '1.6.21', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin:1.6.21')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo (9 s 311 ms)
I am running Windows 10 and have no clue how to resolve this. Can anybody provide some input?
thanks

Related

Plugin [id: 'com.android.application', version: '7.3.1', apply: false] was not found in any of the following sources:

I'm facing below error when I try to sync my new project:
Plugin [id: 'com.android.application', version: '7.3.1', apply: false] was not found in any of the following sources:
Try:
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '7.3.1', apply: false] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.3.1')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
I have installed android studio with below version:
Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 amd64
I tried many solutions from stackoverflow but none of them working.
I have connected with office VPN network is this blocking gradle build ? If yes Please let me know how can I resolve this.

Android Studio plugin Gradle errors

So i just wanted to creat a hello world app and this happened
Build file 'C:\Users\Yuness\AndroidStudioProjects\MyApplication2\build.gradle' line: 3
Plugin [id: 'com.android.application', version: '7.1.2', apply: false] was not found in any of the following sources:
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '7.1.2', apply: false] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.1.2') Searched in the following repositories: Gradle Central Plugin Repository Google MavenRepo
if your project is open in android studio, follow these simple steps as seen in the below screenshot
click on the project tab at the top - left of your android studio app.
Down your project structure, click on Gradle Scripts. In the drop down, you will see two build.gradle files
Open the build.gradle with (Module:Application_Name.app)
Inside the build.gradle file opened, make sure the it contains the following at the top.
plugins { id 'com.android.application'}
Then build your application.
if you still receive this error, then open the other build.gradle file with (Project:Application_Name)
check for plugin section and paste this below
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
}
Build your application.
if you dont find any of these file, it means you need to create the build.gradle. but as a beginner, is better to delete the project and create it again.
please make sure your internet is active to sync your gradle
gradle
Can you try this
Go to 'File'
Click on 'Sync Project with Gradle files'
Make sure you have internet connected

Android build fails in new Android Bumblebee 2021.1.1 patch 3

Hello there guys i need some help from you, I have updated my Android Studio to Bumblebee 2021.1.1 patch 3.
And after downloading Gradle 7.2 and installed it on my system, it was correct, I added it to the Gradle path in the studio. Now the problem comes here when building project at first time
Here is the Error am getting
Gradle sync failed: Plugin [id: 'com.android.application', version: '7.1.3', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.1.3')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo (6 m 19 s 228 ms)

Why am I getting 'manifestOutputDirectory' error after android studio update?

My android studio has just updated and after that my app is not able to compile anymore. It shows this error:
Execution failed for task ':app:processDebugManifest'.
Could not get unknown property 'manifestOutputDirectory' for task ':app:processDebugManifest' of type
com.android.build.gradle.tasks.ProcessMultiApkApplicationManifest.
Android studio: 4.1
Android gradle plugin version: 4.1.0
Gradle: 6.6.1
It was an outdated Huawei's AG Connect plugin. Solution here: stackoverflow.com/a/64390789/1363087

Warnings with Gradle about artifacts after update to Android Studio 2.2

a few days ago I've updated to Android Studio 2.2. After this, I've had a couple of warnings in my project:
Warning:Ignoring Android API artifact com.google.android:android:1.6_r2 for debug
Warning:Ignoring Android API artifact com.google.android:android:1.6_r2 for release
Anyone knows the reason about it?
At last, I find out the problem. It was caused by AndroidVideoCache library. To solve it, simply replace this (in my specific case):
compile 'com.danikula:videocache:2.6.3'
by
compile('com.danikula:videocache:2.6.3') {
exclude group: 'com.google.android', module: 'android'
}

Resources