0

android studio in 2020.3.1 meets this error, however it can run successfully. in lower android studio version such as 3.6, the error gone.

in build.gradle:

sourceSets {
main {
    res.srcDirs = [
            'src/main/res',
            'src/main/res/layout',
            'src/main/res/layout/test'
    ]
}

}

as picture show: Snipaste-2022-01-24-17-56-36.png

  • There is no error text on the attached screenshot. Please add the exact error text and the code snippet where it occurs. – Konstantin Annikov Jan 25 '22 at 01:34
  • yes, There is no error text in whole screen, very strange – user18022720 Jan 25 '22 at 08:42
  • please upload all relevant information to this site rather than referring/linking somewhere else – Queeg Feb 02 '22 at 20:06
  • Likely the same issue as https://stackoverflow.com/a/72377150/246914. Android Studio no longer supports sharing within a module with srcDirs. It now requires a module to share code. – Jamie Sep 12 '22 at 19:21

0 Answers0