NND,eclipse里导入工程出现问题了,整了半天,来个这问题,无效工程描述,找了半天看.projec文件是否工程名对应,看androidManifest.XML换里面的代码版本号,我擦都无济于事。
无意中发现importing project的时候会出来个android下的Existing android code into workspace,千万别选这个,选了的话搞什么换目录等,烦死你。
最轻松的解决办法是:往上面看,还有个general里,这个文件夹下有个Existing projects into workspace,选择这个才行。
有些时候在做涉及一些关于android系统安全的项目时,如更改手机的状态等
按如下方法设置: 1. 假设要引用的android工程叫LibProject,引入到的工程叫MainProject; 2. 设置LibProject,右键-Properties-Android,将Is library项选中,然后Apply; 3. 设置MainProject,右键--Properties-Android, 在Library中,点击Add按钮,将LibProject工程加入,Apply即可。 设置完成后,在MainProject工程中能看到LibProject的代码等资源都已经引入进来。
可以用相对布局RelativeLayout;然后给他一个id;然后再写那个按钮时把他相对的父控件式这个相对布局的id;下面是按钮总在最上层的右下角:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webMainLayout"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnRegister"
android:layout_alignBottom="@id/webMainLayout"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="切换邮箱"
/>
</RelativeLayout>