facebook

Android Development Problem

  1. MyEclipse IDE
  2.  > 
  3. Mobile Tooling
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #341960 Reply

    Phil Gibbs
    Member

    Many times when writing or modifying code in say an Activity class all lines with a reference to a layout property eg; R.layout.logs_view or R.id.log_id, all such lines suddenly go red meaning these cannot be resolved. This despite the fact that the layouts exist, are valid and have worked in previous runs. After saving my changes Eclipse adds an import (import android.R). The Activity class is in the same package as the generated R file. When I delete the import and re-compile all is again ok. So, Eclipse somehow forgets the location of the R generated class. Also, I frequently get a compile failure due to Eclipse failing to delete the ‘bin/class/com’ folder. Manually deleting the contents of this folder occasionally works, but most times I have to shutdown Eclipse and restart.
    Anyone got any clues about why this is happening?
    Using Build 10.7.1-20130201. Windows 7 Pro 64-bit with 16Gb RAM

    #341995 Reply

    barkingcat,

    Sorry that you are seeing this issue.

    compile failure due to Eclipse failing to delete the ‘bin/class/com’ folder

    > Can you please try opening MyEclipse with Administrator rights (Close MyEclipse, then right click on MyEclipse and select Run as Administrator) and check whether the folders are deleted while compiling ?

    writing or modifying code in say an Activity class all lines with a reference to a layout property suddenly go red meaning these cannot be resolved

    > We could not replicate the issue at our end. Can you please prepare a sample project which exhibits the issue and send it over to help us investigate further.
    > Can you please mention what type of error you see ? Is it ‘R cannot be resolved to a variable’ error or some other error ?
    > Please make sure that you have the latest version of Android SDK ?

    #342001 Reply

    Phil Gibbs
    Member

    Thanks for your response. I am an admin on my PC but I tried starting with Admin access but that did not help. It’s going to be a bit difficult packing up this app and allowing it to run due to it being heavily database based. I’ll try working on it, or sending you a simple test app without db being needed. I have a bunch of apps in my workspace but cannot recall this problem in these others. Another issue which is very frustrating is that after a small change to xml or to code the app will fail to compile due to it not resolving classes (in the same app, but in several packages). Sometimes a ‘Clean’ will solve the issue, and some times a fake trivial code change will resolve it. Also, I get the annoying compile failure due to not being able to delete classes in the bin folder. I have to go into Navigator view to delete them and sometimes this tactic does not work. I have deleted the entire MyEclipse app from my PC, reinstalled the latest version but nothing improves. I’m spending as much time fighting the IDE as I am in development.

    #342057 Reply

    barkingcat,

    Sorry that you are still facing this issue.

    1. Can you please try opening MyEclipse using the -clean command ? Please refer this FAQ for more details – https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/
    2. You mentioned that you are facing the issue with only one application, Can you please import that app in to a new clean workspace and check whether you are seeing the issue.
    3. Are you trying to run the app on ‘MyEclipse emulator’ or ‘Real device’ ? Please share the exact details with us.
    4. Check the console and problems tabs at the bottom of the MyEclipse UI, and let us know if there are problems listed in either place.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Android Development Problem

You must be logged in to post in the forum log in