草庐IT

android - 获取 java.lang.IllegalStateException : The current thread must have a looper

我收到此错误,我的应用程序崩溃了:java.lang.IllegalStateException:Thecurrentthreadmusthavealooper!我对如何在Google上使用looper了解不多,我正在使用线程(主要用于休眠功能)、处理程序(用于在异步任务运行时下载图像)和异步任务(用于从中获取JSON数据)网址)。我不知道如何解决这个问题,所以任何建议都会很有帮助。这是点击按钮时执行的线程代码:Viewview=flingContainer.getSelectedView();view.findViewById(R.id.item_swipe_right_indica

android - 错误 : The file name must end with . xml 或 .png

即使我没有选择photothumb.db作为可绘制对象,我还是收到一条错误消息,提示photothumb.db应以.xml或.png结尾我的profilesmaller图片是png类型下面是我的代码下面是我的Gradle控制台消息FAILURE:Buildfailedwithanexception.*Whatwentwrong:Executionfailedfortask':app:mergeDebugResources'.>C:\Users\CharleneMarie\AndroidStudioProjects\Guest\app\src\main\res\drawable\phot

java - 错误 : "class must implement abstract method X", 但它已经发生了

我有这个抽象父类(superclass):publicabstractclassMediaListActivityextendsActivity{...abstractvoidlaunchMedia(MediaFilemediaFile);}和具体的子类:publicclassVideoListActivityextendsMediaListActivity{...voidlaunchMedia(MediaFilemediaFile){//TODO:implementlaunchMedia()}}在VideoListActivity子类的第一行,AndroidStudio报错Class

构建期间的 Android 错误 - "default public constructor with no argument must be declared"。什么原因?

AndroidStudio在构建期间返回错误,即使在运行Clean和重建之后也是如此:Adefaultpublicconstructorwithnoargumentmustbedeclaredifacustomconstructorisdeclared.我找不到行号,也找不到引用的文件。我不知道是什么原因导致的,因为构建中没有任何迹象表明这是什么原因。 最佳答案 如果你有这样的自定义构造函数publicclassDogeextendsRealmObject{publicDoge(Stringname){...那么你还必须有一个没有额

android - 百分比框架布局 : You must supply a layout_width attribute

我尝试使用PercentFrameLayout但我收到此错误消息:BinaryXMLfileline#:Youmustsupplyalayout_widthattribute.这是我使用的xml:这是一个错误还是我的错误? 最佳答案 由于XML布局规范,layout_width和layout_height属性仍然是必需的,但在PercentFrameLayout或中实际上被忽略了PercentRelativeLayout.您只需将值设置为0dp或wrap_content:这类似于标准LinearLayout与layout_weigh

android - 非法参数异常 : width and height must be > 0 in activity

当我在平板电脑上而不是在手机上运行我的应用程序(我以前从未尝试过)时,当我开始某个Activity时,我会得到这个堆栈跟踪。我查看了该Activity的.xml文件以查找在运行时可能为0的任何内容,并替换了想到的所有内容(例如?attr/actionBarSize)但它没有改变任何东西。我最大的问题:堆栈跟踪太长,无法找到异常的来源。有什么想法可以找到我的错误吗?PS:我不知道该Activity中有任何位图,这使它更加困惑java.lang.IllegalArgumentException:widthandheightmustbe>0atandroid.graphics.Bitmap.

[Android]问题解决-Device must be bootloader unlocked

现象在push文件时,remount命令发生如下报错:$adbremountDevicemustbebootloaderunlocked解决1.打开开发者模式中的OEMunlocking开关2.fastbootunlock设置adbrebootbootloaderfastbootflashingunlock根据屏幕提示,按up键选择unlock$fastbootflashingunlock...(bootloader)StartunlockflowOKAY[20.178s]finished.totaltime:20.178s重启回到normal模式开机fastbootreboot3.再次rem

jenkins邮箱设置报:501 mail from address must be same as authorization user

jenkins配置邮箱时遇到如下错误:501mailfromaddressmustbesameasauthorizationuser原因是管理员邮箱地址与发送邮箱地址不统一,配置管理员邮件地址:系统管理-系统配置-JenkinsLocation,输入与发件人统一的地址即可

android - addView() 之后的 "resultIndex is -1, the polygon must be invalid!"

在ViewGroup(FrameLayout)上调用addView()方法后出现异常。publicfinalViewcreateView(Contextcontext,Propertyproperty,ViewGroupparent){mView=LayoutInflater.from(context).inflate(getLayout(),null);mContext=context;mProperty=property;processBaseViews(mView,property);processViews(mView,property);parent.addView(mVie

android - java.lang.IllegalArgumentException : y must be < bitmap. 高度()

我有这种方法可以与xhdpi中的图像进行比较,但给我这个错误java.lang.IllegalArgumentException:y必须是这里是代码:privatebooleanCompareImages(ImageViewim1,ImageViewim2){booleanbool=false;intcheck=0,v1,v2,v3,ev1,ev2,ev3;Bitmapbitmap1=((BitmapDrawable)im1.getDrawable()).getBitmap();Bitmapbitmap2=((BitmapDrawable)im2.getDrawable()).getB