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:
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所在的包,即主程序的包,非测试类的包。