Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
333 views
in Technique[技术] by (71.8m points)

Unable to write jarlist cache file while creating android project

While creating an android project in Eclipse, I get the error:

[2014-03-13 15:14:36 - appcompat_v7] WARNING: unable to write jarlist cache file C:UsersNeelakanteshwarAndroidFirstappcompat_v7injarlist.cache

And appcompat_v7 folder is created along with project folder in Eclipse.

Can anyone please help me to get the solution.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

The appcompat_v7 folder is added because you use an action bar component.

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.

After that, you must modifier the AndroidManifest.xml and put the level that you need.

<uses-sdk
    android:minSdkVersion="14"   ------> change it
    android:targetSdkVersion="19" />` 

Heads up! Delete all appcompat_v7_XX. It is a bug.

With appcompat_v7, you will see that Eclipse creates two XML files:

  • 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:

  • Make a copy of the folder "BlanckActivity" located in this path: sdkoolsemplatesactivities of an ADT previous version.

  • Rename the folder as BlankActivityNoFragment, then edit the field name of the file template.xml such that, it reads name=BlankActivityNoFragment

  • Copy the new folder in the same path of the new 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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...