0

It's my first time developing for android. I'm trying to develop in eclipse environment, but I have a problem. The class R.java isn't generated. I've already tried everything like function clean or refresh->clean, and reinstall eclipse. Maybe the problem can be in my layout:

My layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

</RelativeLayout>
Manish Dubey
  • 4,206
  • 8
  • 36
  • 65

1 Answers1

0

I assume you mean it isn't being regenerated? This problem comes up a lot in Eclipse. Just delete the existing R.java and it will regenerate correctly.

Or do you mean you have no R.java at all?

j__m
  • 9,392
  • 1
  • 32
  • 56
  • No. My Eclipse isn't generated R.java. Instead of it's generated this class: /** Automatically generated file. DO NOT MODIFY */ package com.example.hello; public final class BuildConfig { public final static boolean DEBUG = true; } – André Paris Mar 21 '13 at 18:22
  • The BuildConfig class should be generated additionally to the R class. You can check the DEBUG constant from code to see if it's compiled with or without debugging. – Ridcully Mar 21 '13 at 18:26
  • How did you create this project? The New Android Application wizard always creates an R file by default. – j__m Mar 21 '13 at 18:29
  • I created my project normally, new->android project. Nobody knows how to solve my problem.. =/ I want to develop in Eclipse, but just my Netbeans is working... – André Paris Mar 21 '13 at 20:59