Project has no default.properties file! Edit the project properties to set one.错误解决方法

本文详细介绍了Android项目中default.properties文件的作用及其配置方法。该文件用于指定项目的开发目标平台版本,如使用android2.2进行开发。同时,文章还提到了在Eclipse中正确配置并导入项目的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  这是因为import的项目没有 default.properties 这个文件引起到,该文件记录项目中所需要的环境信息,比如Android的版本等。 一般的default.properties文件代码如下所示,代码中的注释已经把default.properties解释得很清楚了,如果某个项目没有default.properties这个文件,我们可以直接从其他项目中拷贝过来使用。“target=android-8“表示使用android 2.2平台开发。

view plaincopy to clipboardprint?
01.# This file is automatically generated by Android Tools. 
02.# Do not modify this file -- YOUR CHANGES WILL BE ERASED! 
03.#  
04.# This file must be checked in Version Control Systems. 
05.#  
06.# To customize properties used by the Ant build system use, 
07.# "build.properties", and override values to adapt the script to your 
08.# project structure. 
09.# Project target.  
10.target=android-8 
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-8

注意点:
我们如果在ecplise中添加了default.properties,项目可能还是有错误,我们需要重新import这个项目,这个ecplise就能自动给项目生成一个gen文件夹,并添加“Android 2.2“的库文件夹。

 

本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/xw13106209/archive/2010/08/24/5834296.aspx

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值