1.mac安装android studio
解决方案:如果你是安装新手,可以下载androud studio boundls 和 安装环境的jdk就可以了,不需要单独在配置环境了,如果你有经验,可以单独装sdk,avd manager 等等
2.ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
解决方案 :(1)打开 sdk manager 下载 extras 下面的intel x86 enulator accelerator
(2)finder -》应用程序 —》android studio 显示包内容 —》sdk -》extras -》intel -》Hardware_Accelerated_Execution_Manager 安装IntelHAXM_6.1.1dmg就可以解决
3. Only the original thread that created a view hierarchy can touch its views.
只有主线程才能更新ui
3.单独创建Activity入口类配置
<activity
android:name=".FirstActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
4.创建Activity
选择calss继承 extends Activity
实现父类方法
@Override
protected void onCreate( Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.first_layout);
}
5.element shape doesn't have required attribute android
新建的shape文档不能放到layout中去,应该放倒drawable文档里面