resources.ap_ does not exist when compile my android project

前端 未结 28 2746
慢半拍i
慢半拍i 2020-12-13 06:01

Compile Error: Error generating final archive: java.io.FileNotFoundException: ..\\bin\\resources.ap_ does not exist.

Compile other simple sample works. Same source f

相关标签:
28条回答
  • 2020-12-13 06:24

    AndroidManifest.xml displayed within Eclipse was out of sync with what was on disk/being read by Android. shutdown restart eclipse and edit AndroidManifest.xml to be correct and clean and build.

    Happens due to having two AndroidManifest.xml files and renaming them. Two useful if two apps from same code base. Linking projects with Android is problematic.

    0 讨论(0)
  • 2020-12-13 06:24

    I had both values and values-en folders and it was picking the string from the values-en folder. I deleted the en folder and it was back to normal.

    I tried

    1. Clean
    2. Delete gen
    3. restart eclipse
    0 讨论(0)
  • 2020-12-13 06:24

    You might need to remove extra files from your assets or res directory. One case I had was having both "A.jpg" and "A.JPG" files in the assets directory. It prevented the resources.ap_ file from being generated.

    0 讨论(0)
  • 2020-12-13 06:25

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

    0 讨论(0)
  • 2020-12-13 06:26

    For me, it was turning off Instant Run.

    Preferences -> Build, Execution, Deployment -> Instant Run -> uncheck "Enable Instant Run to hot..."

    Also, I heared killing a goat and draw a pentagram on the office floor with its warm blood helps prevent these kind of problems.

    0 讨论(0)
  • 2020-12-13 06:26

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

    I had to remove the offending character and clean the project before it would build.

    0 讨论(0)
提交回复
热议问题