创建android项目时无法写入jarlist缓存文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22374891/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to write jarlist cache file while creating android project
提问by neelu
While creating an android project in Eclipse, I get the error:
在 Eclipse 中创建 android 项目时,出现错误:
[2014-03-13 15:14:36 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Neelakanteshwar\AndroidFirst\appcompat_v7\bin\jarlist.cache
[2014-03-13 15:14:36 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Neelakanteshwar\AndroidFirst\appcompat_v7\bin\jarlist.cache
And appcompat_v7
folder is created along with project folder in Eclipse.
和appcompat_v7
文件夹,在Eclipse项目文件夹一起创建。
Can anyone please help me to get the solution.
任何人都可以帮我找到解决方案。
回答by Necho
If you go to appcompat_v7/bin
folder, you'll see that file jarlist.cache
doesn′t appear or is unsynchronized. You need to refresh the appcompat_v7
folder, only press F5 over that folder.
如果您转到appcompat_v7/bin
文件夹,您会看到该文件jarlist.cache
没有出现或未同步。您需要刷新appcompat_v7
文件夹,只需在该文件夹上按 F5。
The appcompat_v7
folder is added because you use an action bar component.
将appcompat_v7
因为您使用的操作栏组件文件夹添加。
Aah. To avoid a new appcompat_v7_XX
folder when you are creating a new project, choose a LEVEL API 14 as Minimum Required SDK.
啊。为避免appcompat_v7_XX
在创建新项目时出现新文件夹,请选择 LEVEL API 14 作为最低要求的 SDK。
After that, you must modifier the AndroidManifest.xml
and put the level that you need.
之后,您必须修改AndroidManifest.xml
并放置您需要的级别。
<uses-sdk
android:minSdkVersion="14" ------> change it
android:targetSdkVersion="19" />`
Heads up!Delete all
appcompat_v7_XX
. It is a bug.
当心!全部删除
appcompat_v7_XX
。这是一个错误。
With appcompat_v7
, you will see that Eclipse creates two XML files:
使用appcompat_v7
,您将看到 Eclipse 创建了两个 XML 文件:
activity_main.xml
fragment_main.xml
activity_main.xml
fragment_main.xml
If you want to have an option to create a project in the old way only with activity_main.xml
, do that:
如果您想选择仅使用 以旧方式创建项目activity_main.xml
,请执行以下操作:
Make a copy of the folder "BlanckActivity" located in this path:
\sdk\tools\templates\activities
of an ADT previous version.Rename the folder as
BlankActivityNoFragment
, then edit the field name of the filetemplate.xml
such that, it readsname=BlankActivityNoFragment
Copy the new folder in the same path of the new Eclipse IDE:
sdk/tools/templates/activities
复制位于此路径中的文件夹“BlanckActivity”:
\sdk\tools\templates\activities
ADT 以前的版本。将文件夹重命名为
BlankActivityNoFragment
,然后编辑文件的字段名称template.xml
,使其显示为name=BlankActivityNoFragment
将新文件夹复制到新 Eclipse IDE 的相同路径中:
sdk/tools/templates/activities
Now you′ll see the new template when you go to create a new project.
现在,您将在创建新项目时看到新模板。
Remember to choose as Minimum Required SDK as API 14
请记住选择最低要求的 SDK 作为 API 14
回答by Manoochehr
Change Workspace path in starting Eclipse:
在启动 Eclipse 时更改工作区路径:
- from
C:\Users\XXXXXXXX\workspace
- to, for example
D:\My_Folder
- 从
C:\Users\XXXXXXXX\workspace
- 例如
D:\My_Folder
回答by joshuamabina
Also got the same problem today.
今天也遇到了同样的问题。
Install and configure all the required components.
On the menu bar,go to:
Project->Properties->Java build path
.On the order and exporttab: check all the project libraries. I checked Android 4.4.
安装和配置所有必需的组件。
在菜单栏上,转到:
Project->Properties->Java build path
。在订单和导出选项卡上:检查所有项目库。我检查了Android 4.4。
回答by VijayDroid
This may not be the professional way but it worked for me.
这可能不是专业的方式,但它对我有用。
- Manually create a folder named jar in the path:
C:\Users\\***\appcompat_v7\bin\
- Referesh your project in eclipse.
- 在路径中手动创建一个名为jar的文件夹:
C:\Users\\***\appcompat_v7\bin\
- 在 Eclipse 中引用您的项目。
回答by Zhanna
Just got the same problem today.
今天刚遇到同样的问题。
In my case the combination of your advices became a solution:
在我的情况下,您的建议的组合成为了一个解决方案:
In Eclipse project bar I have deleted Appcompat(XYZ) and the new project that I just created.
Checked for updates - no updates were found.
Clicked File -> Restart.
While creating new project have chosen API 14 as Minimum Required SDK.
在 Eclipse 项目栏中,我删除了 Appcompat(XYZ) 和我刚刚创建的新项目。
检查更新 - 未找到更新。
单击文件-> 重新启动。
创建新项目时选择 API 14 作为最低要求的 SDK。
Done.
完毕。
回答by Hazzor
That's because you also need Adroid Version 2.1! Go to Android SDK Manager and download Android Version 2.1 (API 7)
那是因为您还需要 Adroid 2.1 版!转到 Android SDK Manager 并下载 Android 版本 2.1 (API 7)
If you start a new Android App. Project there is typed that FROM 2.1 TILL 4.4 Android version. So that mean the program is searching for the minimum Android version bro :)
如果您启动一个新的 Android 应用程序。项目是从 2.1 到 4.4 Android 版本。所以这意味着该程序正在搜索最低 Android 版本兄弟 :)
BTW: Download the 2.2. Android Version, too. :)
顺便说一句:下载 2.2。安卓版也是。:)
回答by ShutterSoul
Run an Eclipse update (Help -> Check for Updates) and let me know if this resolves your problems.
运行 Eclipse 更新(帮助 -> 检查更新)并告诉我这是否解决了您的问题。
回答by user3406698
Just refresh the bin folder of appcompat_v7!
刷新appcompat_v7的bin文件夹即可!
回答by bugfree
Well... I met the same situation. I deleted my project from eclipse and on the disk, delete the workspace from the disk, and recreate the project in the new workspace... it works.......
嗯...我遇到了同样的情况。我从 eclipse 和磁盘上删除了我的项目,从磁盘中删除了工作区,然后在新的工作区中重新创建了项目......它有效......
回答by ridoy
A different approach worked in my case, saying it here if it can help someone. I also came across this weird problem of appcompat
while creating a new project.
一种不同的方法在我的情况下起作用,如果它可以帮助某人,请在这里说出来。我appcompat
在创建新项目时也遇到了这个奇怪的问题。
I have just clean and buildthe default appcompat_v7
project for 2 timeswhich is created by eclipse itself and voila it worked! and all errors are gone, works perfectly.
我刚刚清理并构建了2 次由 eclipse 本身创建的默认appcompat_v7
项目,瞧它工作了!并且所有错误都消失了,完美运行。