Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.45 KB

File metadata and controls

47 lines (35 loc) · 1.45 KB

ResolveCommonAndroidStudioIssues

Issue 1: Incompatible Android Gradle Plugin (AGP) Version

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.

Resolution Options

Suggestion 1: Modify AGP Version

If you want to continue using your current Android Studio version, you can downgrade the AGP to a supported version.

Steps:

  1. Open your build.gradle file and locate:
    plugins {
        id(libs.plugins.android.application)
    }
  2. CMD + Click -> Takes you to libs.version.toml
  3. Find the agp version at the top
  4. Modify version to AGP 8.2.1 (based on what ever the Latest supported version is in the error message)
  5. Sync Project

Suggestion 2: Upgrade android studio

Issue 2: SourceSet with name 'main' not found

A problem occurred configuring project ':app'. Could not create task ':app:com.example.kotlinpractice.AppKt.main()'. SourceSet with name 'main' not found.

Suggestion 1: go into gradle.xml and add the delgateBuild option tag:

  <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>