So, I had to have my laptop restored, and now when I open my eclipse workspace, my appcompat_v7_11 package has an error in it, and now some of my apps have errors all over the place because of it. I need to reinstall the appcompat package or at least restore the 7_11 package back to the way it was. I want the proper way of doing this, that way I don't end up deleting the wrong files, duplicating the same files, or anything else that will make the problem worse. Thank you in advance.
EDIT: So I realized that each of my appcompat files are assigned to each one of my apps. So obviously my appcompat file 7_11 must have been messed up when my computer was restored. Is there a way to fix or restore this file that way I won't have 100 errors in my app?
EDIT 2: This is the error I get:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'DayManager'.
java.lang.NullPointerException
Errors running builder 'Android Resource Manager' on project 'appcompat_v7_11'.
java.lang.NullPointerException
If you know of any android help centers that may help me, please post them, as I can't continue my app development without fixing this problem.
EDIT 3: I've noticed that it is missing the Android 4.4.2 and Android Private Libraries
I am replying to the thread a year later but hope this helps others who might land up here with this query.
This is what worked for me
Go to Project and select Clean on your eclipse tool
This video helped https://www.youtube.com/watch?v=fp-hiJrTROU
There are more tips here
Related
Please help me, I'm having serious trobules with Eclipse for the second time.
I'm following a guide and in these last days my Eclipse used to work fine (and was heavy 600 mb), now after the updates I did recommended by the guided, it downloaded a lot of things for hours and my folder now is 12.6 GBs (and it's pretty uncofortable since I'm on a not too large SSD).
The problem is that the old ADT worked, after the update every project gives errors, like there is no Android SDK.
The console gives me this error
[2014-11-18 22:37:33 - DDMS] DDMS files not found: C:\Users\Ruggiero\Desktop\Ruggiero\android_dev_environment\sdk\tools\hprof-conv.exe
If it can help you, when I run Eclipse it shows me this error message
Now, the most obvious thing would be "just press Check for updates".
When I do it, it says me there are no updates.
So I go for "Install new software" and after I go to the link (official Google link) and try to install the updates it gives me this error
error2 http://s7.postimg.org/h5r1gaa63/eclipseerror2.png]
Please do not flag as duplicate as I already searched on the web and StackOverflow too and even if I found similar troubles, no one was equal or really close to mine.
I had a similar problem. The only way I could make it work was to completely uninstall Eclipse and Android SDK and reinstall again.
There are likely workarounds for this, but I think I suggest just downloading a fresh Android bundle (with all the correct updated software), and install it fresh.
I have had experiences where something goes wrong in the tools update, and found the simplest way to correct is to uninstall my existing tools and start fresh. It is easy to install the bundle, and you will know you have all the correct packages and software installed.
You will spend a bit of time trying to debug your install, it will be quicker to install a fresh instance.
I self resolved by switching to Android Studio IDE
I often randomly receive "R can not be resolved variable" errors, and when it happens I can never fix them unless I create a new project and copy and paste all the code. I think this shows that these are not errors from my code. I have cleaned the projects, restarted eclipse, my computer, and even reinstalled Eclipse, but none of those work.
I Have noticed that the gen file (Generated auto file) does not contain any file. I have not deleted them my self and this has frequently happened before.
I know that many people has posted questions on this topics but they have never worked for me and they usually receive low rating so not many people comments on them either. Also if it requires cmd or terminal, please give the commands for Windows, Linux/Mac. I use Mac. I have recently installed GooglePlayService in the SDK although it worked after I installed it.
I am very sorry for lack of useful information, as I have no idea what the issue is.
Here are some of my screen shots to show MainActivity.java, Package explorer and res.values.strings.xml.
I apologize for describing the situation in a confusing way but I tried my best, please tell me what you find confusing if you do find this confusing.
Aftr all Thank You Very Much!!!
Your "gen" folder is empty. It should contain R.java
[1]
Try this:
-Right click your project
-Select properties
-Select Java Build Path
-Click add Folder
-Select the gen folder
-Click OK
[2]
if [1] doesn't work
Check your Res folder for any errors in your XML files, if one of the files has errors, then the R file will not be built
This error was caused by a bug on the Eclipse where even, if you click on re-build it does not regenerate the resource file.
To fix this, even if your eclipse claim that it is the latest version, you should go on the homepage and manually reinstall the latest eclipse with ADK or just install the android studio
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.
I'm building an Android app.
I worked today on my app, and suddenly I saw that all the projects in the workspace are marked with an error. I don't know what caused it, and I can't find explanation of the error anywhere.
I'm using Helios with Windows 7. I even tried downloading Eclipse again but it didn't help.
Today I tried to integrate Facebook with my app. Their tutorial required me to try to get a hesh key from a keystore. In the process I added an Environment Variable named JAVA_HOME, and pointed it to the JDK.
I don't know if it's the cause of my problem, but I think it might be related.
I really don't know what to do.
Thanks!
Try this. In eclipse, go to Project --> Clean --> Select "clean all projects". This should rebuild all projects.
Try cleaning your android project. I get problems with Eclipse sometime, and if I clean the project, it fixes it.
Find the "Problems" view. That will give you more details. Post the description of the problems, we can get more information.
click Window -> Show View -> Problems
Typically, the problem is with a resource you've recently added to your project (drawable, assets, raw, etc.)
Some things to check are:
Invalid XML files
Invalid 9-patch images (outer 1-pixel border must be full black or transparent)
Typically, just start by removing a resource, then cleaning your project (Project > Clean). If the errors go away, that resource is your problem. If not, continue this process until the error DOES go away. Start with the most recent resources you've added, naturally.
i solved error or all project showing errors this way.... close eclipse.
then Right Click on eclipse shortcut-->open file location-->open command widows there and type "eclipse.exe -clean" eclipse the starts..and in my case errors were gone...hope it helps
I'm on the android bandwagon and started going through google's "view" tutorials. Here is what I'm using:
Eclipse Galileo
Android SDK 2.1
Java SDK 6.Something I think.
Everything was hunky-dory until I hit the grid view tutorial. I got errors all over the place when I started editing the "HelloGridview.java" File. I thought I'd fix it by following through with the next part of the tutorial, creating the ImageAdapter class, but it created more. I realized alot of my issues could be resolved by importing widgets which were not mentioned in the tutorial (i.e. android.widget.GridView, .ImageView, .BaseAdapter etc.) However, after all the reconciliation suggested by eclipse the files were finally showing no errors. I go to run it as an android app and bam, "Your project contains error(s)." window comes up. There are no errors showing on the files I've created. I cleared the error log and shut down eclipse and started again the error log now reads: Conversion to Dalvik format failed with error 1. I'm a little lost at this point. I think I've included the required information. If you need to know more let me know.
Any help is appreciated.
I had the same problem. Eclipse imported a jar in the java build path and this somehow caused the error.
Right Click o the project -> Java Build Path and make sure you have only once imported android.jar.
Some of those examples on the Android developer site are a trifle out of date, and so it may be that the one giving you grief is no longer a great example to work from.
Try this GridView sample for something that definitely works on current versions of Android.