android 软件开发错误-解决记录
1.You cannot combine custom titles with other title features
系统版本:android4.0,在Manifest.xml文件中为该activity 指定一个主题,替换默认就好。如:
<activity android:name="com.zww.jpmanager.Login" android:theme="@android:style/Theme.Black" > </activity>
Type Can't find API database; API check not performed 我遇到这个问题是因为把公司的项目拷贝到实验室的eclipse下出错的,改了AndroidManifest.xml中队最低版本的要求就好了,原来我是14 现在改成10 就好了
2.android.database.sqlite.SQLiteException: near "?": syntax error (code 1):
错误原因:表名是不可以作为参数传进去的。
经过测试,在使用rawquery方法时,使用?来做变量替换,只有当?在=之后时有效。
3.代码中出现如下错误:
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
分析:
问题在于new AlertDialog.Builder(Context),虽然这里的参数是AlertDialog.Builder(Context context)
但我们不能使用getApplicationContext()获得的Context,而必须使用Activity的Context对象,因为只有一个Activity才能添加一个窗体。
解决方法:
将new AlertDialog.Builder(Context context)中的参数用Activity.this即可
更多相关文章
- Android(安卓)OTA升级新旧版本任意升级
- Android系统编译so库提示error undefined reference to '__andro
- context.obtainStyledAttributes 研究
- Android之activity跳转并且回调
- Android(安卓)Studio报错:Manifest Merger failed with multiple
- Android(安卓)ListView的OnItemClickListener()参数详解
- ubuntu下android源代码以及内核的获取
- android 实现圆角imageView的两种方法
- Android(安卓)studio gradle文件说明与配置