Jump to content




Recent Status Updates

  • Photo
      18 Aug
    KodeKool

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
  • Photo
      11 Aug
    Error

    Should I be practicing programming every day? I feel if I don't, I'll get instantly rusty or something.

    Show comments (4)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

R can't resolved error ?! Android Error

android error

Best Answer BlackRabbit, 28 February 2013 - 12:36 PM

Well... to be honest, my personal solution is not to use Eclipse! lol

I rather intellij-Idea, it's fairly more stable than eclipse, but it requires an a little more advanced user.

 

Java packages, projects, etc are tied up to directories, files, sometimes something changes, a path, or the way the ide scans the dir and your project goes awol. It happens less in IntelliJ than in Eclipse.

 

Still, one thing that could have happened is you updated (or it auto updated) eclipse or java or android sdk, some path changed, some config was lost and your project lost a link to a jar file, a sdk or the path for something.

That is why usually re scan makes the trick, as it did your re install.

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1 <Java>

<Java>

    CC Regular

  • Member
  • PipPipPip
  • 38 posts

Posted 27 February 2013 - 10:46 AM

Hi guys :) 

 

how are u ?!

 

 

I'm working on new Android app, 

but  there is an error prevent me from run the app recently:

 

R.layout.main

 

underline the R :

"R cannot be Resolved to a variable "

 

 

I've tried clean, build, import the R  &  I have even deleted my app & start again but nothing seems to change at all.

 

 

 

what shall I do ?!

 

 thanks in advance .

 

 



#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,297 posts

Posted 27 February 2013 - 10:53 AM

Sounds to me like the project is messed up. What IDE are you using?

Are you sure it's and android project type and the android SDK is linked?

 

if so, one way to go is use the clean and rescan directories utilities, and then rebuild all.

 

Sometimes IDE doesn't keep up with the project files and this kind of things happens.



#3 <Java>

<Java>

    CC Regular

  • Member
  • PipPipPip
  • 38 posts

Posted 27 February 2013 - 05:23 PM

Sounds to me like the project is messed up. What IDE are you using?

 

oh , sorry. Eclipse. 

 

 

Are you sure it's and android project type and the android SDK is linked?

 

Yeah, Sure. I've run it many times before.

& it was perfect. 

 

 

 

 

if so, one way to go is use the clean and rescan directories utilities, and then rebuild all.

 

Sometimes IDE doesn't keep up with the project files and this kind of things happens.

 

I've just uninstalled  the IDE & re-instill it again & finally work correctly.

But that won't be fair to do that every time I face the same problem.

It consumes my time :(

 

Is there any way to avoid this error or any solution to face it off?!

 

also, the virtual device for the new instill doesn't show me the new app?!

 

&

 

Thanks for replay :)

 

 

 

 

 

 

 

 


Edited by <Java>, 27 February 2013 - 05:44 PM.


#4 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,297 posts

Posted 28 February 2013 - 12:36 PM   Best Answer

Well... to be honest, my personal solution is not to use Eclipse! lol

I rather intellij-Idea, it's fairly more stable than eclipse, but it requires an a little more advanced user.

 

Java packages, projects, etc are tied up to directories, files, sometimes something changes, a path, or the way the ide scans the dir and your project goes awol. It happens less in IntelliJ than in Eclipse.

 

Still, one thing that could have happened is you updated (or it auto updated) eclipse or java or android sdk, some path changed, some config was lost and your project lost a link to a jar file, a sdk or the path for something.

That is why usually re scan makes the trick, as it did your re install.



#5 <Java>

<Java>

    CC Regular

  • Member
  • PipPipPip
  • 38 posts

Posted 03 March 2013 - 10:43 AM

Well... to be honest, my personal solution is not to use Eclipse! lol

I rather intellij-Idea, it's fairly more stable than eclipse, but it requires an a little more advanced user.

 

 

Sorry but I have a silly question :P;

can I open my project in intellij-Idea though I used the Eclipse to develop at the begining  ?!

 


 

 

 

 

Still, one thing that could have happened is you updated (or it auto updated) eclipse or java or android sdk, some path changed, some config was lost and your project lost a link to a jar file, a sdk or the path for something.

That is why usually re scan makes the trick, as it did your re install.

 

 

 

So changing the paths again to defult can solved the problem?!

How can I do that ?!

 

sorry for annoying but I have to summit my work to the tutor this wensday.

& the problem appeares again :( ..


Edited by <Java>, 03 March 2013 - 10:43 AM.


#6 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,297 posts

Posted 03 March 2013 - 11:43 PM

Nothing to be sorry about, if anyone it would be Eclipse who should be apologizing.

 

Yes, you can work with eclipse projects on intellij this way:

Go to create project, fill whatever field you got, then in one of the next> it gives the option: Create from existing folder, there select your eclipse project folder and then it will ask you if you want to import the project



#7 <Java>

<Java>

    CC Regular

  • Member
  • PipPipPip
  • 38 posts

Posted 07 March 2013 - 08:49 AM

Thank youuuuuuuuuuuuuu soooooooooooooooooooooo much Black Rabit :)

 

u r really save my meeting,

 

oh I don't belive that I made all that in  one day!

 

thanks again :thumbup:



#8 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,297 posts

Posted 07 March 2013 - 08:19 PM

Glad to help! you keep going that fast pace ;)

and make us know how the meeting went



#9 <Java>

<Java>

    CC Regular

  • Member
  • PipPipPip
  • 38 posts

Posted 09 March 2013 - 03:33 PM

Glad to help! you keep going that fast pace ;)

and make us know how the meeting went

 

Well, I'm working on My final Year Project , & my supervisor was expecting the first part of Ver.zero to be done by Wednesday,

& Yeah, I made it through, did it. thanks to you . :)

 

still working on, the rest of the Android app, & the stand alone :)