AndroidManifest.xml is missing - android

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]

Related

Android Studio 3.1 issues

Does anyone have such problems as:
Cannot install debug-apk because cannot find Application file, which exists in Androidmanifest.xml or:
The APK file /home/skullper/AndroidStudioProjects/app_pay/app/build/outputs/apk/app-debug.apk does not exist on disk.
Error while Installing APK
Of course I can fix this with ./gradlew assembleDebug, but I should launch this each time before run, otherwise it will run only assembleDebug build
Issue with kotlin std in projects with Java only
When I was using 3.0 everything was ok and I haven't such issues. What should I do to run my project???
UPDATE
Everything works. Answer in comments under question.
Thank to all who was trying to help
Try rebuilding your project and reinstall if nothing helps, I had this bug on my old computer and rebuilded helped.
Though if you reinstall Android Studio, make sure you delete the AVR folder properly! Otherwise the bits remaining from the previous version will alter the new installation completely useless.
did you try to go to Android Studio's File menu and select Invalidate Caches / Restart... option, then restart Android Studio?
If so try this:
1- Remove the directory ~/.gradle/caches/. It's OK to do this while Android Studio is opened. (Refer pm installing wrong package name)
2- Press "Sync project with Gradle files" icon on Android Studio
3- Run the project and the remote path will be correct.
Try this:
1 - Go to "Run/Debug configurations"
2 - In "Before launch" click in the "+"
3 - Add "Gradle-Aware Make"
4 - Click OK
Image here
Hope it helps

Android Studio freezes on indexing

my project was working well but suddenly when I ran it on my phone, Android Studio freezes and I should stop it from task manager.
before this happens I installed "Geny motion" & "Virtual Box", but when the error occurred I uninstalled them. but the problem insisted.
Solutions I've tried
I uninstalled it and installed it again
I unplugged and plugged in my device
I disabled android indexing from setting
None of the above solutions worked.
I had today this exact problem. None of the above helped me until I found simple solution here
Just run File -> Invalidate Cache and Restart
That simple and it works!!!
Delete all Android Studio data - .gradle .android .androidstudio folders from your home folder. And all project build folders gradle and iml files.
This worked for me.
1.Close the project
2.Remove the project
3.Close Android Studio
4.Open it again
5.Open the project
Enjoy Coding!
I checked my java file and I saw somehow all the code in one of my java files was replaced with "NULL NULL NULL NULL....."
I deleted the file and the application runs without a problem.
Android Studio (3.1.3) froze on me while editing a source file. I waited and finally killed the process in Task Manager (Windows). Twice I tried to start up again and both times it got stuck with the "indexing..." message in the lower right. Both times I ended the process in Task Manager.
I looked in the source folder of the project I was working on. The source file I had been editing when it froze was "Receipt.java". There was another file in the src folder "Receipt.java__jb_tmp__". I deleted that file and Android Studio started up fine. It looks like I lost some edits, though.
When I did start up, it detected there had been some error and offered to submit a report.
If the project is large & has a lot of modules, you might need to increase the Allocated Heap Size for Android Studio.
Go to Edit Custom VM Options from Help menu and increase the value for -Xms and -Xmx
This is what I'm using
-Xms2048m
-Xmx8192m
-XX:MaxPermSize=2048m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseCompressedOops
In my case color was declared as invalid, Android Studio ignored that and during building it froze. I had to remove the file, let it index, paste it back and fix the color string (it gave me error when I entered the pasted file)
just rename project folder then open IDE, it will show
now rename back to origin folder name, click open project
it work on my case
I have older project with sdk version 22, when I open it in android studio 3.1.2 on macOS. It keep indexing forever, everything was installed and configured properly but indexing loop never stopped.
Following worked for me
File > Invalidate caches/restart… > Invalidate caches/restart
Go to the File menu and click the option Invalidate Caches / Restart This will solve the problem ! Enjoy ;)

Error with parsing Android sdk content and initializing java tooling in eclipse

Every time I open Eclipse, I get the following error messages:
Android SDK Content Loader:
parseSdkContent failed java.lang.NullPointerException
Initializing Java Tooling
An internal error occured during: "Initializing Java Tooling". java.lang.NullPointerException
Loading data for Android 2.2
Parsing Data for android-8 failed java.lang.NullPointerException
Loading data for Android 2.3.3
Parsing Data for android-10 failed java.lang.NullPointerException
Loading data for Google APIs (Google Inc.)
Parsing Data for Google Inc.: Google APIs:8 failed java.lang.NullPointerException
See link for screenshot:
http://i.stack.imgur.com/lhhQQ.png
(I am using OS X Lion, and Eclipse Helios)
First i read some posts saying that it was the AVD.ini file in the .android profile that was causing the trouble. I tried deleting all the entire .android profile folder as suggested in Android SDK Content Loader failing with NullPointerException. This didn't correct my problem.
I tried deleting the entire Android SDK folder, downloaded it again and installed a couple of Android versions through it. Still the same error messages...
To ensure that I didn't have any old plugins or something that were the issue, I uninstalled eclipse, downloaded it again and installed the Android plugin again. (So the plugin is up to date).
When I go into one of my Android projects, I get error messages on places where I acces resources by using the R file. Regular Java projects work fine, but all Android projects gets small red boxes with white crosses on them. I have been searching for a solution to this problem since yesterday, but at this point I'm completely qlueless and would appreciate any help I can get!
Close all open projects and exit Eclipse. Now you can open Eclipse without getting the error. Start opening your projects one by one to find which one causes the problem. This is most likely because you deleted a Device profile inside the AVD manager.
Do not delete all the full .metadata
Backup .metadata
delete only .metadata/.plugins/org.eclipse.core.resources/.project
restart eclipse
Observation : the projects folders are created
Further - if you are using svn/git/hg have code repository links it would be destroyed, so to reinstate
close eclipse
copy relevant projects from backup to merge with current projects in .metadata/.plugins/org.eclipse.core.resources/.project
restart eclipse
Downfall - sporadic fail error may occur (sync or something) - harmless
backagain
I encountered exactly the same issue this morning. This is a workspace related issue.
Solution 1
I looked into my .metadata and read .bak_number.log files . Some layouts failed to parse and my projects were out of sync with the file system.
So I deleted all the .bak_number.log files. Relaunch Eclipse and the whole worskspace should work again the way you left previously.
Solution 2
However if it's not due to out of sync with the file system. Change the workspace then import all the eclipse projects from the previous workspace.
Thanks the project.properties files , the dependencies are still kept.
PS : I should return to IntelliJ :)
first close your Eclipse
Go to your workspace and rename .metadata to tushmetadata and go to
tushmetadata- >.plugins -> org.eclipse.core.runtime -> .settings
and copy all files from it.
now open the Eclipse and go to your workspace there you can see the
newly generated .metadata folder in that go to .plugins ->
org.eclipse.core.runtime -> .settings and paste here and do not
overwrite any file.
Try to "Hello World" project and run it.
Try to delete file .metadata from your android workspace folder. .Metadata folder contains all configuration files for eclipse. It works for me.
Your answers might be right. What I did was to change my workspace. I redownloaded the project I was going to work on from git, and reimported it. Now it works fine :) Maybe there was some files in this project that made the error messages apear? Dunno....
I have remove the .metadata folder but after it, when I run the eclipse, I cannot creates any Android project. To solve it, I have done the follow:
Go to the main work directory of eclipse
Localize the folder com.android.ide.eclipse.adt It should be in .oldMetadata/.plugins/
Copy it to the new eclipse configuration: .metadata/plugins/
See the full solution here:
http://www.jiahaoliuliu.com/2011/06/running-android-sdk-in-eclipse-errors.html#solution4
For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer versions of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.
When I met this problem about a year ago, I had some projects in my workspace that needed a specific Android SDK level (let's say 2.1) and i didn't have it installed in the Android SDK.
slott's answer helped a lot. Deleting the .metadata or reinstalling eclipse didn't though. The trick was to isolate the project causing the problem, delete its .settings folder and .project file and reimport it.
I discovered another cause, where I'd added a space character into an otherwise blank line in the project.properties file. When I eventually ran android update project -p .
the program (android.exe) threw a NPE exception. When I deleted the space from the blank line the android update project command worked and eclipse started behaving (after running clean a few times).
This happened with r20 of the Android SDK on a Windows 7 64-bit machine.
FYI my change that fixed the problem in project.properties is public at http://code.google.com/p/android-daisy-epub-reader/source/detail?r=517
This is just weired.
In my case when I took a subversion update, I was getting this problem. The reason was the corruption of my project.properties file (due to subversion conflict).
I just corrected the file and problem got solved.
I found it's just missing project.properties file in the project folder. After copying one from another project the error is gone. The only valid line in project.properties is
target=android-8
If you are using SVN or GIT please check whether the project.properties has conflicts or not.
Sometimes project can not be open because of this.
I hope this is useful to someone and saves his/her time: My colleague was facing same issue and we did almost everything mentioned here, with no luck. In the end we changed the Android SDK version in the manifest file and it worked.
This solution worked for me.
Close Eclipse and delete all .markers inside your workspace folder.
Restart Eclipse (once I had to restart it twice, it hang on the first but worked on the second for no aparent reason).
Of course, it's always safe to back them up first.

eclipse not updating android project

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.

R.java doesn't exist...but it does! Problem started after installing ADT 10.0.0

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

Categories

Resources