用Eclipse进行android移动应用开发,一直新建不了项目,孩子心态要崩了。求大佬指教。反复报以下错误是什么原因。。
[2023-04-20 13:21:29 - HelloWorld] W/ziparchive( 5704): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:21:29 - HelloWorld] W/zipro ( 5704): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:21:29 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:21:29 - HelloWorld]
[2023-04-20 13:21:29 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2023-04-20 13:21:29 - HelloWorld]
[2023-04-20 13:21:29 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2023-04-20 13:21:29 - HelloWorld]
[2023-04-20 13:21:29 - Dex Loader] Failed to load D:\学吧学吧\大三下\移动应用开发\SDK\build-tools\29.0.3\lib\dx.jar
[2023-04-20 13:21:29 - HelloWorld] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
[2023-04-20 13:28:13 - HelloWorld] W/ziparchive( 3180): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:28:13 - HelloWorld] W/zipro ( 3180): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:28:13 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:28:13 - HelloWorld]
[2023-04-20 13:28:13 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2023-04-20 13:28:13 - HelloWorld]
[2023-04-20 13:28:13 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2023-04-20 13:28:13 - HelloWorld]
[2023-04-20 13:30:19 - HelloWorld] W/ziparchive( 832): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:30:19 - HelloWorld] W/zipro ( 832): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:30:19 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:30:19 - HelloWorld]
[2023-04-20 13:30:19 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2023-04-20 13:30:19 - HelloWorld]
[2023-04-20 13:30:19 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:30:19 - HelloWorld]
[2023-04-20 13:30:41 - HelloWorld] Error in an XML file: aborting build.
[2023-04-20 13:30:50 - HelloWorld] W/ziparchive( 1040): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:30:50 - HelloWorld] W/zipro ( 1040): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:30:50 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:30:50 - HelloWorld]
[2023-04-20 13:30:50 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:30:50 - HelloWorld]
[2023-04-20 13:30:59 - HelloWorld] W/ziparchive( 6832): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:30:59 - HelloWorld] W/zipro ( 6832): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:30:59 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:30:59 - HelloWorld]
[2023-04-20 13:32:06 - HelloWorld] W/ziparchive( 2980): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:32:06 - HelloWorld] W/zipro ( 2980): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:32:06 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:32:06 - HelloWorld]
[2023-04-20 13:32:06 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2023-04-20 13:32:06 - HelloWorld]
[2023-04-20 13:32:06 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2023-04-20 13:32:06 - HelloWorld]
[2023-04-20 13:32:08 - HelloWorld] W/ziparchive( 8632): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:32:08 - HelloWorld] W/zipro ( 8632): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:32:08 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:32:08 - HelloWorld]
[2023-04-20 13:32:08 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2023-04-20 13:32:08 - HelloWorld]
[2023-04-20 13:32:08 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2023-04-20 13:32:08 - HelloWorld]
[2023-04-20 13:32:09 - HelloWorld] W/ziparchive( 5052): Unable to open 'D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar': Illegal byte sequence
[2023-04-20 13:32:09 - HelloWorld] W/zipro ( 5052): Error opening archive D:\学吧学吧\大三下\移动应用开发\SDK\platforms\android-29\android.jar: I/O error
[2023-04-20 13:32:09 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Light'.
[2023-04-20 13:32:09 - HelloWorld]
[2023-04-20 13:32:09 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2023-04-20 13:32:09 - HelloWorld]
[2023-04-20 13:32:09 - HelloWorld] D:\Eclipse\WorkSpace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2023-04-20 13:32:09 - HelloWorld]
[2023-04-20 13:35:29 - HelloWorld] Platform R is a preview and requires application manifest to set minSdkVersion to 'R'
[2023-04-20 13:35:38 - HelloWorld] Platform R is a preview and requires application manifest to set minSdkVersion to 'R'
[2023-04-20 13:35:38 - HelloWorld] Platform R is a preview and requires application manifest to set minSdkVersion to 'R'
应该是Eclipse编码格式不正确导致的,打开Eclipse,选择菜单栏的Window -> Preferences,在Preferences窗口中,选择General -> Workspace,在Text file encoding下拉框中选择UTF-8,点击Apply和OK按钮保存设置,重启一下
不知道你这个问题是否已经解决, 如果还没有解决的话:这些错误可能是由于SDK文件夹中缺少一些文件导致的。为了解决这些错误,可以尝试以下几个步骤:
根据错误信息,可以看到Eclipse无法打开SDK文件夹中的android.jar,同时也无法加载dx.jar。因此,第一步是确定你正在使用的SDK版本号,然后下载对应的SDK。可以打开SDK Manager来检查SDK版本号,并下载相应版本的SDK。
如果下载了对应SDK仍然无法解决问题,可以尝试重新设置Eclipse中的SDK路径。具体步骤如下:
点击Apply和OK按钮,保存设置并退出面板
清空项目缓存和重新编译
如果上述方法都无法解决问题,可以尝试清空项目缓存和重新编译。具体步骤如下:
以上步骤应该可以解决大多数这样的问题。如果仍然遇到问题,请尝试在stackoverflow等论坛中查找相关解决方法或重新安装Eclipse和SDK。