Import com.facebook.android.R; not found - java

Hi there I am trying to impor the facebook sdk project into Eclipse EE Kepler but I always get this stupid error about the import that doesn't found..
import com.facebook.android.R;
I already deleted project and add it again..
I already comment the classes with errors to see if the file would be generated..
I already restarted eclipse..
I already right-clicked the project and select Android Tools > Fix Project Properties
I already clean the problem..
Any thoughs on how to fix this?
Thanks alot in advance..

The problem was that I didn't had the Android SDK Build-tools installed on my eclipse, installing the last version solved the problem. The Gen files are now generated :)
Thanks everyone for the help

I think there is problem with any of your .xml file's error. Just check your res/layout folder. It must be showing error. Open that appropriate .xml file that shows the error. May be your missing some of your resources. Try to solve that error and then clean the project and it's done.

Related

My spring-boot program doesn't have the JavaBuilder in the Properties

I loaded a project on Spring-tool Suite but I realized that it does not correct the errors. Going to see Properties I realized that all the parameters related to the JavaBuilder that I have in the other loaded projects were missing. I think it's a Jdk problem, but I don't know how to set everything up or how to reset the project in order to have the error corrected.
thanks to anyone who can help me!
I think you need to delete the .metadata folder in your workspace.
The problem was Spring-Tool itself which had a bug where it didn't show any kind of error. There are two ways to get around the problem: delete the project from Spring-boot, delete the Workspace and reload everything. In case it is also recommended to download Spring-boot tool Suite again. In the second case it could be an error importing the project, try to import it to Intellij or another IDEE and see if you have the same problems. If you have the same problems it is a problem of loading the java libraries. To solve it you should open another project where you have no problems and once opened, go to FILE-> NEW-> IMPORT PROJECT and import your project.

org.apache import cannot be resolved

I know that this error has been queried many times. I've read these posts, but I still cannot get this to work. I have this error:
The import org.apache cannot be resolved
You can see here that I have included the .jar file in my build path. I got this jar file here and I am using Java 7.
I've also cleaned the project and restarted Eclipse. Can anyone suggest what I should try next? Thank you!
Go to Eclipse -> Preferences search for target platform, press Restore Defaults, press Apply and then press Reload.

"An error occurred while automatically activating bundle com.android.ide.eclipse.adt"

When going here: right-click on my project > Properties > Android the below error happens.
This error happens when I go to Properties > Android on the project or either of the libraries (ignore BibleTriviaPro).
This error seems to have came out of nowhere. I cannot think of anything I have changed and now all of a sudden tonight this error comes up. How can I fix this?
I was having the same error this morning strange as everything was fine last night.
Try cleaning all projects in workspace then restart eclipse - worked for me
Go to Help - eclipse market place - search for adt. Then update or install it. This worked for me.
Got this error after updating the Android SDK and Eclipse ADT when opening a new workspace I created just before the update (where I deleted all projects after the update.) The solution for me was to load another workspace I got containing projects and then load the new workspace again.
Eclipse seems to search the same folder for 'sdk' , so I put sdk folder back in the same folder as Eclipse's. and problem solved.

Java/Eclipse - No more R file ever

I'm on Eclipse for hours now and I didn't found a solution yet for my problem even after many searches on internet: I have no more R.java file on my projects.
On just created or on my old projects, i don't have R file anymore and I tried so many solutions (uninstall, re-install Eclipse, clean my project, check all my XMLs, fix problem with android tool and so on ...)
Please someone can tell me what to do in this case?
Hey If you just updated to ADT Rev 22 :
I had the problem too. There is a new component in the Tools folder called "Android SDK Build-tools" that needs to be installed.
Step 1
Open the Android SDK Manager
Step 2
Select the newly added Build Tools and install. (If problem stays then go to Project Properties => Java Build Path => Order and Export and check Android Private Libraries, then clean and build project.
It may be necessary to repeat the process, restart the SDK Manager after the update and make sure it looks like this (all tools installed):
More info:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D
Perhaps in Project Properties -> Java Build Path -> Libraries you don't have:
Android 4.2.2 (or other version)
Android Dependencies ?
If so, then right click project - > Android tools -> fix android properties
and see if this library showed up.
Thank you all for saving me! I've spent the whole afternoon on search this error.
Finally, my project works.
By the way, I also encountered one problem which i wanna share with you:
After upgrading, even if my project has not errors anymore. During runtime, it seems it couldn't find the classes from the jars placed in \libs.
Go into Project=>properties => Java build path= > Order and Export.
Please make sure all your jars are checked.
If this problem occurs suddenly in a well working project,
the first step is to find whether the problem occurs only in the current project or in all other projects.
if all other projects in the current workspace are working then 90% problem is with XML / mainfestfile/resourse file that you edited recently.
This error is not shown as red mark we have to find out what we have done recently in these files.
try this
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
it solved my problem
Close your eclipse and after refreshing system, try to open Eclipse again. I think you are using Emulator along with the eclipse. It may be because of the low Memory problem (RAM) of your system. I used to face the same problem when I use Emulator
whenever there is any mistakes in any of the xmls the R goes missing when a build or clean happens so check for any xml errors in your project unless you fix it you cant get back your R on clean or build. fix the xml files and perform a clean you will have the R generated. Also check in File->properties->Builders and see if everything is checked
I was using Eclipse Indigo and nothing I tried worked. I ended up downloading Juno SR2, reinstalling the ADT, and now everything works again.
Reinstall everything and it'll work.. i.e. go back to Google SDK or w.e. you're using and download it.
Update it to latest in SDK Manager.
Go into Eclipse-Project-Prefs-Java build path-order/export TICK EVERYTHING.
problem: No R file get generated.
guess: Try cleaning project if it is old one. Else create new project with no R get generated and with no compile errors but this: no project.apk
In this case you have to check your SDK for the built-tools. May not be installed after updating SDK.
Thus download them if not download here, then put them under directory: SDK/built-tools folder. Lastly, and most important, is to Run the SDK As Administrator. This guarantees refreshing SDK with all packages appearing in it.
Install the SDK-Built-Tools or any missing packages according to the above link and you're done.
hope this helps.
Try one thing, create a new Android Project and transfer all those files which are in the previous project. That worked for me.
In my case there is error due to "&" inside strings.xml file(but error not shown) for declaring string for a array type. Now the problem has been solved as I changed "&" to "and".
So, please make sure that you do not have such silly use of symbols, and clean the project.
I have had the same kind of problem, however Rechecking all XML files in the Resources folder was helpful in my case. I found syntax error in my XML files. Cleaning and building the project again can be helpful sometimes too.
I had the dreaded not more R.java.
Some of the things I've used in the past:
Clean / rebuild (the first thing we all try)
Restart eclipse (optionally reboot pc/mac)
Update both SDK/ADT eclipse plugin to latest version
Create new eclipse workspace and import project
Enable Verbose AAPT build output Eclipse menu>Preferences>Android>Build
Port project to Android Studio / Gradle (this helped my actually see the AAPT error i was getting Error Code:138)
Delete recent XML changes - Ultimately I found deleting recent menu.xml files I'd added and commenting out where they were referenced fixed the issue and I finally got R.java.
I got the error recently and had found no fault in any layout or value file. After a lot of tries I add another Activity and the R.java was build and the error disappeared. I don't know why this occur, but it takes me hours.

How do you Add a Library folder to eclipse?

Okay, I know this is a Noob question but I cant see to get it figured out! I'm trying to get the Android-ViewPageIndicater library imported to Eclipse, but it doesn't have a LIB file to add, and I cant figure out how to import the library folder because Eclipse says theres no project in it! Does anyone know how to do this? Thanks
I was facing the same issue. The solution is
1>Create a new android project with existing source (Select that library folder)
2> Mark that project as library
Later you can use this library for other projects

Categories

Resources