I'm having trouble making eclipse update the default icons and app name. I have changed the icons in the res/drawable-[h][m][l] folders and changed the 'app_name' in the manifest file but i still see the old icon and name when i test on my device.
I made the application with phonegap, if it matters, anyone have any ideas?
Try to clean and rebuild your project. Do that by going to Project -> Clean and then rebuild your project.
A clean and rebuild should fix this issue. If not, a fresh restart of Eclipse should do the trick.
Note that if you replaced the original files through OS's file manager instead of drag & dropping it into Eclipse, you have to select the /res directory and press F5 to tell Eclipse to refresh, otherwise it will hold onto old resource files.
Related
I re-opened my Android Project after blue screen on my machine running Windows 10, all classes and components are unfound. Anybody any idea? I tried re-build and re-start my machines n times.
In addition to CmosBattery's comment:
File -> Invalidate Caches / Restart ... -> Invalidate and Restart.
This lets Android Studio basically forget everything it knows about your project and forces it to reinitalize everything.
I suspect, that the bluescreen prevented Android Studio from writing a file and so the project state got corrupt.
If this still fails, I recommend to check out a fresh copy and if you do not use source control yet (do it now :)) backup your files, create a new project and copy them back into the newly created project.
Check that your module(-s) uses valid Android SDK: press Ctrl+Shift+Alt+S and check modules one by one. May be the same validation should be done in build.gradle script
Just check your project at its path in Windows File Explorer. If the project exists -with all its files (java, layouts, manifests, gradles and other project files)- just go to Android Studio--> File --> Open --> Your project root directory.
It will rebuild the project as new
Hope it helps
I'm using Eclipse (4.2.1 Juno) on Windows 7 for my Android 2.2 project. I have several PNG resources in my drawable folders, and I'm finding that if I edit my PNG files (Paint/Photoshop etc) Eclipse doesn't recognise the file has changed and the ADT graphical layout designer still displays the old version of the image. I've tried refreshing the project folders list, tried doing a Project->Clean but neither has any affect. The only way I've found of getting Eclipse to recognise the new image version is to exit completely and restart which is a pain.
Is there some setting I can use to tell Eclipse not to 'cache' the images and always read the latest version off disk?
Try in Eclipse Project -> Clean then select your project. This will delete your R.java file and will generate new one.
That is a common problem of Eclipse that it doesn't recognize external changes for files in the workspace. The only thing I have found out to remedy this problem a little (apart from refreshing like crazy), are the refresh settings in external tools configurations. That is, if you run for example an Ant build, you can tell eclipse to refresh the workspace or specific resources afterwards. I don't know of any automatic way to do this though.
you should try saving all the unsaved resources and files after adding images ,than try out again.try cleaning both options with cleaning your single working project and with cleaning all projects.
I don't know of an automatic setting, but I have found a relatively simple manual action that seems effective. I was having the same trouble as you; now the following procedure seems to work consistently for me, with Eclipse Juno 4.2.1.
Click on the "res" folder to select it, then press F5 to refresh. Also make sure your PNG file timestamps have been touched.
Resources cached in bin\res folder.
Create script which delete folder bin\res with all content.
Add this script as external tool in builder list.
Set position in builder list - after CDT builder. Second position in list. If no CDT builder - set it first.
Enjoy.
I created one android application project in eclipse and whenever I tried to run that application its throwing an error message saying AndroidManifest.xml file is missing. what is the reason for this ?
I am using eclipse with android-sdk and ADT version is 20. in SDK manager I installed android 2.2 API level only.. Is this is the problem for that error ?
Delete bin folder in project and your library dependencies. Then re-run application.
you should clean and refresh your project once.
I was able to fix this by manually deleting the bin directory, as well as the gen directory, right clicking project and selecting Android Tools->Fix Project Properties, then using Project->Build All.
Restart your eclipse and make sure that build automatically checked. It worked for me all the time. Hope this helps some one.
I closed all projects that were unrelated with the one I was trying to run (right-click on project in Project Explorer and then selecting Close Project) and the problem magically disappeared (for no apparent reason). Then, even after I re-opened the closed projects, the problem did not come back.
I put the AndroidManifest.xml that in appcomatv7 and pasted to the project and problem solved
Click project -> Refresh (F5) -> Go to "Project" in the menu bar -> Clean. It works for me.
I was having the same problem and didn't understand why - followed all deletes of /bin, /gen, fixing AVD's, etc, still to no avail.
The /bin got me thinking though -
I had previously used this advice to exclude /bin from the resource filters (in an effort to remove results from the search)....
I removed the filter for /bin and voila.....
Interesting this only affected me when I wanted to Debug or Run within Eclipse -- I could export a working APK without any problem, but debugging failed.
Hope this helps.
I had the problem in android studio after an update , it worked by Tools ->Android ->sync with gradle file
(what worked for me)
1 - copy the file build.gradle
2 - drop the copied file in the android folder [example MyApp/android]
I've a little truble with android emulator, when I change (for example) string on strings.xml, I rebuild my app, but when I run the app into android emulator, App runs with my old strings and is not updated with the new data.
Anyone knows how to solve it?
Thanks in advance
you need clean build
If you only modify the xml files or other resource files, I think the eclipse will not rebuild your project.
Sounds like Eclipse isn't rebuilding the code. Check to make sure you have "Build Automatically" checked under "Project". Try cleaning your project and refreshing it. If the problem still exists... well I'm not sure.
Just uninstall the application and then reinstall it with the new changes , you have mad in the application.
Try to follow those instructions:
Disconnect the emulator.
2.save the current project
3.clean the project build directory.
4.Then try to run the emulator again.
Check your app/src/main/res directory. You can have different versions of main.xml and the emulator can use the one which you even do not change anything on it. Just keep the one in layout folder and delete others. This method has fixed my problem.
I get this error when I try to clean a project:
ERROR: Unable to open class file ....R.java: No such file or directory
So I can't build my projects any more. But R.java is there in the gen folder and looks fine when I open it.
This happens to every one of my projects. I tried completely deleting the Eclipse folder and reinstalling it (Helios on Windows) and Android ADT. No luck.
I have also tried moving my workspace to a different drive. No luck.
I made sure all folders in my workspace are not read only. This worked the first time, but immediately the error came back when I cleaned my project.
This all started right after installing ADT 10.0. I am wondering if it somehow is building R.java as a read-only file.
EDIT: Is deleting the eclipse directory sufficient to reset all of its configuration?
More info: All my projects are fine, until I rebuild or clean them. Then every class that looks at R.java throws an error.
Did you try to remove "bin" and "gen" folders and after that make clean/build?
I have somehow managed to fix it, but I don't know exactly what did it. Here are things I did.
Deleted eclipse directory and reinstalled it and ADT.
Deleted my original project that was the first to have the problem.'
Created a new project with my original's project name.
Manually copied all my class and res files into the new project and refreshed it.
Pasted the text of the old manifest into the new manifest.
I did all this, because simply importing the original project again didn't solve anything.
After the above changes, my other projects still had the problem after pressing clean on them. But then I could fix those by deleting the Gen folder, and making sure the Java Build Path had all folders checked.
I think format C: and reinstalling windows
will be preferred way to solve this issue :)
now for serious that work for me
install all updates restart eclipse and close your project
restart eclipse and delete gen from eclipse and rebuild your project
if you're having the problem for all of your projects, it could be this:
"Debug certificate expired" error in Eclipse Android plugins
that's what fixed it for me, even though I wasn't getting any debug certificate errors. apparently the debug certificate is only valid for one year.
I found this issue reported for Mac:
But it's the same for Windows, and I guess, for Linux. I've posted there a workaround, very similar to the one by TenFour04, but without the need to reinstall anything:
Delete project from Eclipse;
Delete all project generated and configuration files and folders (bin, gen, .classpath, .project, default.properties);
Go to Eclipse and create a new Android Project (do not import an existing one) choosing your original source files;
Adjust all setting (JRE, libraries, linked files, aspects, etc...)
Clean.
Helo guys,
:) This my solution which work for me fine in eclipse.
First : You need to make a copy of the file who make the problem.
Second : delete this file from eclipse
Third : Project >clean
After you can restart your delted file from the location where you have saved it.
Have a nice day