gen already exists but is not a source folder

前端 未结 15 1167
深忆病人
深忆病人 2020-12-22 23:37

I am developing my Android project, After I removed a unused library, I got the error:

myproject/gen already exists but is not a source fold         


        
15条回答
  •  梦毁少年i
    2020-12-22 23:55

    The gen folder is where ADT creates the R.java file, which specifies your resource definitions. i.e. your resources (colours, dimensions, layouts, etc) are converted to code, and placed in R.java in the gen folder.

    So when you build the app you need to ensure the gen folder is treated as a source code folder by your IDE, as it contains the R class.

    In your IDE, you need to mark the gen folder as a source folder, so its content are built alongside your source.

    Your acceptance rate is very low. If you want people to help you, you need a high acceptance rate.

提交回复
热议问题