R.java Missing in Android Project in NetBeans

前端 未结 8 1187
一整个雨季
一整个雨季 2021-01-03 00:10

I\'m doing this for a project in AP Computer Science.

Basics:
Mac OS X 10.5.8
NetBeans 7.0
Android SDK 3.0 (Level 11)

So I\'m

相关标签:
8条回答
  • 2021-01-03 00:55

    I had the same problem, but all I did was a "Clean and Build", and then the R file was created by Netbeans (running 7.1).

    I had to run netbeans as administrator on my Windows 7 pc before it could build the R file. If you're saving the project to somewhere "secured", make sure that Netbeans gets all the neccessary rights to read/write/edit that location

    0 讨论(0)
  • 2021-01-03 00:55

    In my case adb was missing.After installing adb everything worked fine.

    0 讨论(0)
  • 2021-01-03 00:59

    You can just right-click the project and choose build from the context menu.

    (This works for me. I am using NetBeans 8.1)

    0 讨论(0)
  • 2021-01-03 01:01

    Get Android plugin for NetBeans and then you will be able to open these project and play with them. The project home page is http://www.nbandroid.org/

    Some initial steps may be needed. Set up SDK location in Tools | Options | Misc | Android. Then check that your project has some build target set in (select project, r-click and go to project properties). Once the build target is set plugin will (re-)generate build script and required .properties files. You'll be able to run build then.

    -Radim

    0 讨论(0)
  • 2021-01-03 01:01

    Several things could be going on, but what happens to most people is:

    1. an error makes R not build
    2. R is unknown, they try to fix the error by importing packages
    3. There is now a "import R.id" or something in the java files
    4. ...
    5. Loss

    Also, it could just be point one, that a problem with the setup (manifest broken, wrong project props, or something like that) make R not generate, and then you won't have R.

    But really, I've seen some examples of people doing point 3.

    0 讨论(0)
  • 2021-01-03 01:04

    Just right-click on the project, select the "Update broken project" command, then "Build" is not gray no longer. Build it, OK!!

    The right-click menu command

    0 讨论(0)
提交回复
热议问题