eclipse创建一个Android应用工程产生的问题汇总

1,新创建的Android Application project总是编译有问题,找不到android.support.v7 包?

答:对于这个问题,是因为工程找不到android.support.v7这个包,我们需要做的是首先查看%sdk%/extras/android/support 是否存在,如果不存在需要:右键你的工程,Android Tools,点击Add Support Library...,然后下载相应的support支持包。下载完毕之后,找到/extras/android/support/v7/appcompat,执行以下两步。

Step 1:

Select File > Import.

Select Existing Android Code Into Workspace and click Next.

Browse to the SDK installation directory and then to the Support Library folder. /extras/android/support/v7/appcompat/.

Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.

Step 2:

Right-click on your project -> Properties In Android->Library section click Add Select android-support-v7-appcompat -> Ok


2,SDK 升级后产生ERROR,类似 Error parsing ...\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml cvc-complex-type.2.4.d: Invalid content was found starting with element 'd:skin'. No child element is expected at this point"

答:There´s a problem with the packages of android wear of the API 22, so my solution was deleting this packages:enter image description here


3,Error in appcompat_v7 library:Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton'?
答:打开project.properties文件,在res目录下找到支持Android API最好的版本号, 修改target=android-【最高版本】。


4,开启Android虚拟机,总是处于Waiting for HOME ('android.process.acore') to be launched...这个状态,但是始终进入不到主机?

答:需要下载一个硬件加速器,

1) Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.

2) Now go to your SDK directory. In this directory Go to extras > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe"


5,通过esprosso框架来测试Android App,AndroidManifest.xml中添加的<instrumentation>标签中android:targetPackage 需要的包名是什么?

答:这里需要指出MainActivity所在的包,即主程序的包,非测试类的包。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值