解决方案 »
- 学习linux驱动有什么建议
- 一段简单的蓝牙扫描代码,老是出错,不知道什么原因!
- popupwindow改变背景颜色已经透明度的问题
- 《2012Sundy高级课程更新》Android深入浅出系列课程文章列表
- ExpandableListView中如何添加删除child元素?
- 问各位高手一个很丢人的小问题~
- android应用程序连接sqlite数据库出现找不到表
- 请教一个软键盘遮挡界面的问题
- eclipse代码补全的问题
- Android wifi 状态下获取内网ip,同一段代码,获取的ip类型不同.
- 怎么讲图片资源的drawable类里面的静态常量读到数组里面去
- 为什么会出现unfortunately has stopped
eclipse上面菜单栏project菜单下把Build Automatically勾中即可
也可以不勾中去使用该菜单目录下的Build All(手动的) 两者只能选中一个
eclipse上面菜单栏project菜单下把Build Automatically勾中即可
我查看了,Build Automatically系统一自动选中了。但不是这个问题,刚才我试过了。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test1"
android:versionCode="1"
android:versionName="1.0" > <uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" /> <application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.test1.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application></manifest>
我的是这样的
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appdes.helloworld"
android:versionCode="1"
android:versionName="1.0" > <uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="16" /> <application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.appdes.helloworld.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application></manifest>
我每次开启sdk manager时,总是能看到几个packages被打勾(因为觉得不需要,所以一直都没有安装),这一次我又打开了sdk manager,并且安装了这几个被打勾的packages(Tools下的Android SDK Build-tools;Android 4.4(API 19)下的SDK Platform和ARM EABI v7a System-Image)。
接着,手动执行了一次project下的clean,因为project下的Build Automatically是默认选中的,所以在我完成clean操作之后系统自动重新build一次。
这是我发现错误没有了,gen下也出现了R.java了。
总结:SDK中支持的最高Android版本的相应packages要安装(或者说,打开SDK若发现有未安装的且又被系统默认打勾的packages的话,请选择安装操作)
不知道我的总结能否对跟我有相似经历的童鞋们有所帮助。同时要谢谢楼上所有为我伸出援手的童鞋,感谢大家。