Resources.ap_ does not exist when compiling my Android project

Compilation error: Error creating final archive: java.io.FileNotFoundException: .. \ bin \ resources.ap_ does not exist.

Compile other simple work examples. The same source file and project work on my college machine.

Any tips? Why is resource.ap_ not generated?

+46
android resources
Dec 14 '10 at 8:00
source share
28 answers

Have you done Project > Clean ? If this does not work, try to get Eclipse to create the project again. Restart Eclipse if it still does not work.

+38
Dec 14 '10 at 8:37
source share
โ€” -

I created an empty text file in the folder C: \ Users \ me \ workspace \ project \ bin \ resources.ap _

Then clean / rebuild ... which seemed to fix it.

+14
Feb 22 2018-11-11T00:
source share

In my case, 9 patches were allocated, which were changed using GIMP, then adb could not "parse" it, recreating it with draw9patch, then it worked fine

+7
Feb 01 '11 at 10:17
source share

I received both an error in this thread and a message in this message: Unknown Android crunch command .

Updating the Android SDK inside Eclipse fixed both errors for me.

+5
Nov 05 2018-11-11T00:
source share

If you delete the entire "gen" folder, go to Project> Build All, which seems to regenerate the folder and R.java file

+4
Jan 27 '11 at 17:06
source share

Finally, I found the reason. The update aapt tool treats a format string without order, like a build error. for example, "% s% d" should be "% 1 $ s% 2 $ d".

+3
Dec 19 '10 at 12:10
source share

Delete the bin and gen directories from the system. Then F5 is in the eclipse.
It helped me. Nothing else worked for me.

+3
Oct 27 '11 at 9:32 a.m.
source share

I got this along with the error when the "aapt.exe" update tool was running.

There seems to be an error in this program when the console assembly output is set to verbose. Changing it to Normal, he fixed it for me.

See this link:

aapt.exe throws an unhandled exception when creating a * .apk file for an Android project in Eclipse

+3
Nov 14 '11 at 6:35
source share

Try going to Window-> Android SDK manager and updating tools and Android 4.0. This solved my problems.

If this does not work, try updating everything.

It completely worked for me!

Link: Error creating final archive: java.io.FileNotFoundException: xxx \ bin \ resources.ap_ does not exist

+3
Nov 14 '11 at 19:44
source share

I tried Notepad 2 Tutorial and got the same error. I used the wrong API-Level (3). I just switched to level 8 and now it works great.

+1
Dec 19 2018-10-19
source share

This problem arose for me after eclipse made some updates. I just went to a backup of my project, took the file and put it in the appropriate place in my current project and everything worked.

+1
Oct. 20 '11 at 20:26
source share

Open File-> Properties and change the target to the correct version of Android. For me it was 1.5 (from a hack-a-day tutorial)

0
Dec 24 '10 at 10:47
source share

AndroidManifest.xml displayed in Eclipse did not sync with what was on the drive / was read by Android. shutdown restart eclipse and edit AndroidManifest.xml to be correct, clean and strict.

It happens due to the presence of two AndroidManifest.xml files and their renaming. Two useful if two applications with the same code base. Linking projects with Android is problematic.

0
Feb 03 2018-11-11T00:
source share

try first

clear automatically create from eclipse

and if not allowed, try uder solution

I found a solution why R.class did not eclipse after restarting - 2, clear, build, etc.

The problem is here in strings.xml:

Hello World, HelloAutoComplete!

HelloAutoComplete are created by default by eclipse when creating projects

Specifically, you change strings.xml for your own requirement, sometimes you clear string.xmls these two lines from your codes.

it creates a problem in the AndroidManifest.xml file

therefore it cannot pass strings.xml

Do not remove these two lines from strings.xml

 android:icon="@drawable/icon" android:label="@string/app_name" android:name=".HelloAutoComplete" android:label="@string/app_name" 

welcomes aarifmohammadkhan@gmail.com

if anyone has a problem in android

welcome to ask questions

Relations aarifmkhan

0
Feb 17 2018-11-17T00:
source share

I had both values โ€‹โ€‹and en-values โ€‹โ€‹of folders, and he selected a row from the values-en folder. I deleted the en folder and it returned to normal operation.

I tried

  • Clean
  • Delete gene
  • restart eclipse
0
Feb 18 2018-11-18T00:
source share

Here are some of my things that have finally done this for me.

1) I used Admob ads and I did not have the attrs.xml file in the res / values โ€‹โ€‹folder

2) I deleted the line that says โ€œimport andriod.Rโ€ from my main action, and all my resources are connected again, and this ultimately led to an error.

3) The last thing I had was wrong: I had a folder "lib" instead of a folder "libs", in which the jar Admob file was stored.

Finally, I cleaned the project after these changes.

So, hopefully this helps someone else to have the same error if none of the above problems fix the problem.

0
Feb 19 '11 at 3:28
source share

I had the same problem, and after digging around various Eclipse weekends, provide discovered that this question should have been done with a distorted 9-patch image.

I found the problem in the output of the problems (Alt-Shift-Q, then X).

0
Feb 28 '11 at 20:35
source share

I had the same error message and it was caused by the presence of a backslash character in one of the values โ€‹โ€‹of the string resource (in the file: res / values โ€‹โ€‹/strings.xml).

I had to remove the offensive character and clear the project before building it.

0
Jun 18 2018-11-18T00:
source share

1 - Try Project > Clean and rebuild the project

2 - If cleaning does not solve this problem, check ALL log in the Console view in Eclipse.

The problem may not be reported at the end of the Console view. In my case, it was available, which does not take into account the format of 9 patches. This is reported somewhere in the Console view, but not at the end !!!

0
Jun 23 2018-11-11T00:
source share

Uninstall all 9 patch fixes created in gimp and update.

0
Aug 25 '11 at 20:52
source share
  • Remove bin and gen in the file system.
  • Update Project (F5) in Eclipse.
0
Oct 21 '11 at 18:26
source share

I ran into the same problem. And I fixed it by deleting the newly added png file. It could not generate the resources.ap file due to one of my png files in drawable.

0
Oct 22 '11 at 12:58
source share

I had this problem after upgrading to Android SDK Tools 15. It was also related to the PNG image, as some other answers show. After analyzing the output of the Eclipse Console, I found that the aapt.exe process crashed while processing one of the images. More precisely, it was at the step with the inscription "Inclusion of resources from the package." To determine the file causing the problem, I looked at the Console output, found 3 calls to the aapt.exe file, and I restarted each of them in the Windows console. The third ("aapt.exe -v -S ... package") crashed in one of my PNG files. After I replaced this file (in all supported resolutions), the problem disappeared.

0
03 Nov 2018-11-11T00:
source share

If you use SurfaceView and have recently changed the package name, you can check for any XML tags that belong to the class.

0
Jan 04 '12 at 6:12
source share

You may need to remove additional files from your resources or the res directory. In one case, I had the files "A.jpg" and "A.JPG" in the resource directory. This prevented the creation of the resources.ap_ file.

0
Jan 19 '16 at 2:07
source share

For Android studio, if you are using gradle 2.2.2, just turn off shrinkResources in the build.gradle file:

  shrinkResources false 
0
Dec 6 '16 at 20:22
source share

For me, it was disabling Instant Run .

Settings โ†’ Build, Run, Deploy โ†’ Instant Launch โ†’ uncheck "Enable Instant Hot Launch ..."

In addition, I heard how I killed a goat and drew a pentagram with warm blood on the floor of the office, which helps prevent such problems.

0
May 13 '19 at 13:58
source share

Try running Eclipse as an administrator.

-3
Dec 17 '10 at 2:00
source share



All Articles