草庐IT

CONTACT_ADDRESS_LINE

全部标签

android.database.sqlite.SQLiteException : no such column: aa: , 编译时:Select Name from stud Where Address=aa

我正在尝试从androidsqlite数据库中检索数据,但它的givine异常是没有这样的列:SqliteSelectQuery是-:c=db.rawQuery("SelectNamefromstudWhereAddress="+a,null);异常(exception):-07-0418:07:00.888:I/Database(648):sqlitereturned:errorcode=1,msg=nosuchcolumn:aa07-0418:07:00.910:D/AndroidRuntime(648):ShuttingdownVM07-0418:07:00.910:W/dalv

android - GSON 抛出 “Expected Expected a name but was NUMBER at line 1 column 8” ?

我正在尝试解析像这样的JSON字符串(使用http://www.json-generator.com生成的URL){"total":86,"jsonrpc":"2.0","id":1,"result":[{"startDate":"14/03/2012","meetingId":"1330","creator":"Jhon","lastModified":"02/04/2012","meetingTitle":"taskclarification","location":"Confhall","startTime":"02:00PM","createdDate":"14/03/2012

IDEA运行测试方法报错Command line is too long

在运行Java测试(特别是在IntelliJIDEA中)时遇到**“Commandlineistoolong”**这个错误,是因为测试框架(如JUnit)试图在命令行中传递一个非常长的类路径。以下是针对这种情境的一些建议的解决方法:1.使用动态类路径:对于IntelliJIDEA:打开“Run/DebugConfigurations”对话框。在“Configuration”选项卡中,勾选“Shortencommandline”选项,并从下拉菜单中选择“JARmanifest”。2.使用maven-surefire-plugin:如果您使用Maven作为构建工具,考虑在您的pom.xml文件中为

android - 如何将 Address 对象数组传递给另一个 Activity

我正在尝试传递Address的数组通过Intent对象将对象传递给另一个Activity。由于Address类实现了Parcelable界面我尝试执行以下操作。我从Geocoder对象中获得了一个ListAddress对象,我将其转换为一个Address对象数组。然后我将这个数组放入Intent中并调用Activity。finalAddress[]addresses=addresseList.toArray(newAddress[addresseList.size()]);finalIntentintent=newIntent(this,SelectAddress.class);int

android - 是什么导致 "RuntimeException: Binary XML file line #20: You must supply a layout_height attribute."(怀疑是ActionBarSherlock)?

我有带ActionBarScherlock的应用程序,我使用ACRA。我收到一些用户的崩溃报告,其中包含以下错误:"java.lang.RuntimeException:BinaryXMLfileline#20:Youmustsupplyalayout_heightattribute.atandroid.content.res.TypedArray.getLayoutDimension(TypedArray.java:491)atandroid.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3602)atand

android - Xamarin proguard.ParseException : Unknown option '' in line 1 of file 'Properties/proguard.cfg'

我正在尝试将混淆器与Xamarin一起使用。所以我在项目选项中启用它(选中EnableProGuard),并在Properties中创建了一个文件proguard.cfg,(作为新的文本文件,对吗?)并检查了BuildAction->ProguardConfigurationproguard文件只包含一个-keep配置,带有注释。无论我是留下还是删除评论,我总是在第1行收到解析错误:#testcomment-keepclass!android.support.v7.view.menu.**,!android.support.design.internal.NavigationMenu,

java - Android : Duplicate contact data while retrieving contacts using ContactsContract. CommonDataKinds.Phone

我浏览了很多帖子,但没有找到任何有效甚至正确回答问题的答案。我最接近的是这个Howtoavoidduplicatecontactname(data)whileloadingcontactinfotolistview?但这有太多的开销。有没有更简单或更有效的方法来解决这个问题? 最佳答案 我遇到了与您相同的问题:我收到了重复的电话号码。我通过获取每个游标条目的标准化数字并使用HashSet来跟踪我已经找到的数字来解决这个问题。试试这个:privatevoiddoSomethingForEachUniquePhoneNumber(Con

android - 运行时异常 : Binary XML file line #17: You must supply a layout_height attribute whie showing the popupmenu

publicvoidshowPopup(intgroup,intimg_index,JSONArrayjson_ar,Viewv){PopupMenupm=newPopupMenu(EditPhotosActivity.this,v);pm.getMenuInflater().inflate(R.menu.popup_menu,pm.getMenu());pm.setOnMenuItemClickListener(newPopupMenu.OnMenuItemClickListener(){@OverridepublicbooleanonMenuItemClick(MenuItemit

安卓.view.InflateException : Binary XML file line #7: Error inflating class

我在尝试运行我的项目时收到错误消息。我想为Android创建TicTacToe,我使用下面的自定义View来创建TicTacToe棋盘:packageorg.me.TicTacToe.ui;importandroid.content.Context;importandroid.graphics.Canvas;importandroid.graphics.Paint;importandroid.graphics.Paint.Style;importandroid.view.MotionEvent;importandroid.view.View;publicclassTicTacToeBo

java - Line2D 的 Android 替代品?

我正在尝试将一些Java语言翻译成AndroidJava语言,并且有一些涉及Point2D和Line2D的代码。我知道Point2D.Float的等价物是PointF,但是是否有与Line2D类似的东西,或者我是否必须重构并完全重写它?如果是这样……有帮助吗? 最佳答案 您可以使用Path例如:Paintpaint=newPaint();paint.setStyle(Paint.Style.STROKE);paint.setStrokeWidth(5);paint.setColor(Color.WHITE);Pathline2d=n