The project is using an incompatible version (AGP 8.3.0) of the Android Gradle Plugin. The latest supported version is AGP 8.2.1.
If you want to continue using your current Android Studio version, you can downgrade the AGP to a supported version.
Steps:
- Open your
build.gradlefile and locate:plugins { id(libs.plugins.android.application) } - CMD + Click -> Takes you to libs.version.toml
- Find the agp version at the top
- Modify version to AGP 8.2.1 (based on what ever the Latest supported version is in the error message)
- Sync Project
A problem occurred configuring project ':app'. Could not create task ':app:com.example.kotlinpractice.AppKt.main()'. SourceSet with name 'main' not found.
<GradleProjectSettings>
+ <option name="delegatedBuild" value="false" />
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>