Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gen folder is empty for Android project

I'm starting to learn Android in Eclipse. But every time I try to create a project the gen folder is empty. So I don't get the R file(or whatever else is in that folder, if anything). Clean does NOT work. There was never an R to begin with. Do I need to download something to make it generate it?

like image 645
pinksharpii Avatar asked Feb 15 '12 19:02

pinksharpii


People also ask

What is Gen folder in Android?

gen/ Contains the Java files generated by Android Studio, such as your R. java file and interfaces created from AIDL files. res/ Contains application resources, such as drawable files, layout files, and UI string.

What is Gen folder?

The Generation folder of a service flow project contains generation properties files and generated runtime code files.

Where are Android projects saved?

Android Studio stores the projects by default in the home folder of the user under AndroidStudioProjects. The main directory contains configuration files for Android Studio and the Gradle build files. The application relevant files are contained in the app folder.

What does the Android project folder raise contain?

The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc.


3 Answers

had the same problem. Check in the Android sdk manager, tools and check if you have installed android sdk build-tools. had the same problem because i hadn't installed it.

like image 190
iglen_ Avatar answered Sep 18 '22 18:09

iglen_


I had this problem because I had two projects in the same folder and one was the library of the other. Then Eclipse built the projects in the wrong order. What I did to fix this was close the non-library project and then open it again (after the built of the library project), which made it work.

like image 43
Alesqui Avatar answered Sep 22 '22 18:09

Alesqui


None of the solutions posted here worked for me: Clean, changing options, build errors, etc. The problem was caused by importing the Android project as a normal project, i.e. using:

Import > General > Existing Projects Into Workspace

instead of using

Import > Android > Existing Android Code Into Workspace
like image 25
Nick Avatar answered Sep 20 '22 18:09

Nick