我正在尝试在Eclipse的Windows机器上构建任何Android SDK示例。我创建了一个新项目,选择了Android Sample Project,然后尝试运行它们。它们编译正常(预编译已启用)但是当它运行时它无法找到我认为应该在构建后步骤中创建的bin \ resources.ap_文件:
生成最终存档时出错:java.io.FileNotFoundException:C:\ Users \ matt \ workspace \ LunieLander \ bin \ resources.ap_不存在
我有试图清理项目。
这是控制台输出:
[2011-11-15 15:11:55 - LunieLander] Refreshing resource folders.
[2011-11-15 15:11:55 - LunieLander] Starting full Pre Compiler.
[2011-11-15 15:11:55 - LunieLander] Removing generated java classes.
[2011-11-15 15:11:55 - LunieLander] Preparing generated java files for update/creation.
[2011-11-15 15:11:55 - LunieLander] C:\android-sdk\platform-tools\aapt.exe package -m -v -J C:\Users\matt\workspace\LunieLander\gen -M C:\Users\matt\workspace\LunieLander\AndroidManifest.xml -S C:\Users\matt\workspace\LunieLander\res -I C:\android-sdk\platforms\android-11\android.jar
[2011-11-15 15:11:55 - LunieLander] Configurations:
[2011-11-15 15:11:55 - LunieLander] (default)
[2011-11-15 15:11:55 - LunieLander] land
[2011-11-15 15:11:55 - LunieLander] port
[2011-11-15 15:11:55 - LunieLander]
[2011-11-15 15:11:55 - LunieLander] Files:
[2011-11-15 15:11:55 - LunieLander] drawable\app_lunar_lander.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\app_lunar_lander.png
[2011-11-15 15:11:55 - LunieLander] drawable\earthrise.png
[2011-11-15 15:11:55 - LunieLander] Src: (land) C:\Users\matt\workspace\LunieLander\res\drawable-land\earthrise.png
[2011-11-15 15:11:55 - LunieLander] Src: (port) C:\Users\matt\workspace\LunieLander\res\drawable-port\earthrise.png
[2011-11-15 15:11:55 - LunieLander] drawable\lander_crashed.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\lander_crashed.png
[2011-11-15 15:11:55 - LunieLander] drawable\lander_firing.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\lander_firing.png
[2011-11-15 15:11:55 - LunieLander] drawable\lander_plain.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\lander_plain.png
[2011-11-15 15:11:55 - LunieLander] layout\lunar_layout.xml
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\layout\lunar_layout.xml
[2011-11-15 15:11:55 - LunieLander] values\strings.xml
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\values\strings.xml
[2011-11-15 15:11:55 - LunieLander] AndroidManifest.xml
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\AndroidManifest.xml
[2011-11-15 15:11:55 - LunieLander]
[2011-11-15 15:11:55 - LunieLander] Resource Dirs:
[2011-11-15 15:11:55 - LunieLander] Type drawable
[2011-11-15 15:11:55 - LunieLander] drawable\app_lunar_lander.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\app_lunar_lander.png
[2011-11-15 15:11:55 - LunieLander] drawable\earthrise.png
[2011-11-15 15:11:55 - LunieLander] Src: (land) C:\Users\matt\workspace\LunieLander\res\drawable-land\earthrise.png
[2011-11-15 15:11:55 - LunieLander] Src: (port) C:\Users\matt\workspace\LunieLander\res\drawable-port\earthrise.png
[2011-11-15 15:11:55 - LunieLander] drawable\lander_crashed.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\lander_crashed.png
[2011-11-15 15:11:55 - LunieLander] drawable\lander_firing.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\lander_firing.png
[2011-11-15 15:11:55 - LunieLander] drawable\lander_plain.png
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\drawable\lander_plain.png
[2011-11-15 15:11:55 - LunieLander] Type layout
[2011-11-15 15:11:55 - LunieLander] layout\lunar_layout.xml
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\layout\lunar_layout.xml
[2011-11-15 15:11:55 - LunieLander] Type values
[2011-11-15 15:11:55 - LunieLander] values\strings.xml
[2011-11-15 15:11:55 - LunieLander] Src: () C:\Users\matt\workspace\LunieLander\res\values\strings.xml
[2011-11-15 15:11:55 - LunieLander] Including resources from package: C:\android-sdk\platforms\android-11\android.jar
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for drawable
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for layout
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for anim
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for animator
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for interpolator
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for xml
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for raw
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for color
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for menu
[2011-11-15 15:11:55 - LunieLander] applyFileOverlay for mipmap
[2011-11-15 15:11:55 - LunieLander] (new resource id app_lunar_lander from C:\Users\matt\workspace\LunieLander\res\drawable\app_lunar_lander.png)
[2011-11-15 15:11:55 - LunieLander] (new resource id earthrise from C:\Users\matt\workspace\LunieLander\res\drawable-land\earthrise.png)
[2011-11-15 15:11:55 - LunieLander] (new resource id earthrise from C:\Users\matt\workspace\LunieLander\res\drawable-port\earthrise.png)
[2011-11-15 15:11:55 - LunieLander] (new resource id lander_crashed from C:\Users\matt\workspace\LunieLander\res\drawable\lander_crashed.png)
[2011-11-15 15:11:55 - LunieLander] (new resource id lander_firing from C:\Users\matt\workspace\LunieLander\res\drawable\lander_firing.png)
[2011-11-15 15:11:55 - LunieLander] (new resource id lander_plain from C:\Users\matt\workspace\LunieLander\res\drawable\lander_plain.png)
[2011-11-15 15:11:55 - LunieLander] (new resource id lunar_layout from C:\Users\matt\workspace\LunieLander\res\layout\lunar_layout.xml)
[2011-11-15 15:11:55 - LunieLander] Writing symbols for class R.
[2011-11-15 15:11:55 - LunieLander] Starting full Package build.
[2011-11-15 15:11:55 - LunieLander] Skipping over Post Compiler.
[2011-11-15 15:12:04 - LunieLander] Refreshing resource folders.
[2011-11-15 15:12:04 - LunieLander] Starting incremental Pre Compiler: Checking resource changes.
[2011-11-15 15:12:04 - LunieLander] Nothing to pre compile!
[2011-11-15 15:12:12 - LunieLander] Starting full Post Compiler.
[2011-11-15 15:12:12 - LunieLander] C:\android-sdk\platform-tools\aapt.exe crunch -v -S C:\Users\matt\workspace\LunieLander\res -C C:\Users\matt\workspace\LunieLander\bin\res
[2011-11-15 15:12:12 - LunieLander] Crunching PNG Files in source dir: C:\Users\matt\workspace\LunieLander\res
[2011-11-15 15:12:12 - LunieLander] To destination dir: C:\Users\matt\workspace\LunieLander\bin\res
[2011-11-15 15:12:12 - LunieLander] Processing image to cache: C:\Users\matt\workspace\LunieLander\res\drawable-land\earthrise.png => C:\Users\matt\workspace\LunieLander\bin\res\drawable-land\earthrise.png
[2011-11-15 15:12:12 - LunieLander] (processed image to cache entry C:\Users\matt\workspace\LunieLander\bin\res\drawable-land\earthrise.png: 93% size of source)
[2011-11-15 15:12:12 - LunieLander] Processing image to cache: C:\Users\matt\workspace\LunieLander\res\drawable-port\earthrise.png => C:\Users\matt\workspace\LunieLander\bin\res\drawable-port\earthrise.png
[2011-11-15 15:12:12 - LunieLander] (processed image to cache entry C:\Users\matt\workspace\LunieLander\bin\res\drawable-port\earthrise.png: 88% size of source)
[2011-11-15 15:12:12 - LunieLander] Processing image to cache: C:\Users\matt\workspace\LunieLander\res\drawable\app_lunar_lander.png => C:\Users\matt\workspace\LunieLander\bin\res\drawable\app_lunar_lander.png
[2011-11-15 15:12:12 - LunieLander] (processed image to cache entry C:\Users\matt\workspace\LunieLander\bin\res\drawable\app_lunar_lander.png: 39% size of source)
[2011-11-15 15:12:12 - LunieLander] Processing image to cache: C:\Users\matt\workspace\LunieLander\res\drawable\lander_crashed.png => C:\Users\matt\workspace\LunieLander\bin\res\drawable\lander_crashed.png
[2011-11-15 15:12:12 - LunieLander] (processed image to cache entry C:\Users\matt\workspace\LunieLander\bin\res\drawable\lander_crashed.png: 66% size of source)
[2011-11-15 15:12:12 - LunieLander] Processing image to cache: C:\Users\matt\workspace\LunieLander\res\drawable\lander_firing.png => C:\Users\matt\workspace\LunieLander\bin\res\drawable\lander_firing.png
[2011-11-15 15:12:12 - LunieLander] (processed image to cache entry C:\Users\matt\workspace\LunieLander\bin\res\drawable\lander_firing.png: 65% size of source)
[2011-11-15 15:12:12 - LunieLander] Processing image to cache: C:\Users\matt\workspace\LunieLander\res\drawable\lander_plain.png => C:\Users\matt\workspace\LunieLander\bin\res\drawable\lander_plain.png
[2011-11-15 15:12:12 - LunieLander] (processed image to cache entry C:\Users\matt\workspace\LunieLander\bin\res\drawable\lander_plain.png: 35% size of source)
[2011-11-15 15:12:12 - LunieLander] Crunched 6 PNG files to update cache
[2011-11-15 15:12:12 - LunieLander] C:\android-sdk\platform-tools\aapt.exe package -v -S C:\Users\matt\workspace\LunieLander\bin\res -S C:\Users\matt\workspace\LunieLander\res -f --no-crunch --auto-add-overlay --debug-mode -M C:\Users\matt\workspace\LunieLander\AndroidManifest.xml -A C:\Users\matt\workspace\LunieLander\assets -I C:\android-sdk\platforms\android-11\android.jar -F C:\Users\matt\workspace\LunieLander\bin\resources.ap_
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\LunarLander.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\LunarView$1.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\LunarView$LunarThread.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\LunarView.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\R$attr.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\R$drawable.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\R$id.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\R$layout.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\R$string.class...
[2011-11-15 15:12:29 - LunieLander] Dx processing C:\Users\matt\workspace\LunieLander\bin\classes\.\com\example\android\lunarlander\R.class...
[2011-11-15 15:12:29 - LunieLander] Using default debug key to sign package
[2011-11-15 15:12:29 - LunieLander] Using keystore: C:\Users\matt\.android\debug.keystore
[2011-11-15 15:12:29 - LunieLander] Build Success!
[2011-11-15 15:12:29 - LunieLander] Refreshing resource folders.
[2011-11-15 15:12:29 - LunieLander] Starting incremental Pre Compiler: Checking resource changes.
[2011-11-15 15:12:29 - LunieLander] Nothing to pre compile!
[2011-11-15 15:50:26 - LunieLander] Starting full Post Compiler.
[2011-11-15 15:50:26 - LunieLander] C:\android-sdk\platform-tools\aapt.exe package -v -S C:\Users\matt\workspace\LunieLander\bin\res -S C:\Users\matt\workspace\LunieLander\res -f --no-crunch --auto-add-overlay --debug-mode -M C:\Users\matt\workspace\LunieLander\AndroidManifest.xml -A C:\Users\matt\workspace\LunieLander\assets -I C:\android-sdk\platforms\android-11\android.jar -F C:\Users\matt\workspace\LunieLander\bin\resources.ap_
[2011-11-15 15:50:43 - LunieLander] Using default debug key to sign package
[2011-11-15 15:50:43 - LunieLander] Using keystore: C:\Users\matt\.android\debug.keystore
[2011-11-15 15:50:43 - LunieLander] Build Success!
[2011-11-15 15:50:43 - LunieLander] Refreshing resource folders.
[2011-11-15 15:50:43 - LunieLander] Starting incremental Pre Compiler: Checking resource changes.
[2011-11-15 15:50:43 - LunieLander] Nothing to pre compile!
感谢你们给我的任何帮助!
答案 0 :(得分:0)
找到它。 aapt.exe崩溃是因为Eclipse Android Build偏好设置为“详细” - 我将其更改为正常并且构建正常。