Marina Perepetaylo
Marina Perepetaylo

Reputation: 31

R.java problems with generating

I tryed to create new project and in my R.java there was next code, for example:

public static final class layout {
public static int activity_main=0x7f030000;

instead of

public static final class layout {
public static final int activity_main=0x7f030000;

So I can't build project normally, because it generates public static int without final.

What should I do?

Upvotes: 3

Views: 181

Answers (2)

Buneme Kyakilika
Buneme Kyakilika

Reputation: 1202

This could be because of many things. 1. Check your xml files have no errors in them as this can stop R.Java from being automatically generated. 2. Clean your project. This will rebuild your project. 3. Delete any android.R import statements. 4. Close and re-open eclipse.

I also wouldn't recommended fiddling with the R.Java file dirctley.

Upvotes: 0

Pinakin Kansara
Pinakin Kansara

Reputation: 76

Right Click on project --> Android Tools -->fix project properties

before doing this remove import statement like

import android.R.*..

or try clean project from

project --> clean

Upvotes: 1

Related Questions