草庐IT

inherited-constructors

全部标签

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

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

android - ProGuard - org.codehaus.jackson.map.JsonMappingException : No suitable constructor found for type

我有一个基于Android的应用程序,它使用Rest服务连接到GoogleAppEngine,该应用程序运行完美,直到它在发布之前通过ProGuard进行了混淆处理。运行混淆后的应用程序时,LogCat报错为:Unabletoconverta[application/json,UTF-8]representationintoanobjectofclasscom.enterprisemk.android.bcw.bincollection.WasteCollectionAreasContainerorg.codehaus.jackson.map.JsonMappingException:

android - Dagger2 错误 : Cannot provide without @Inject constructor

我是Dagger2的新手,遇到了一个小问题。希望你能帮我:)我的android项目中有以下类应用应用组件应用模块主要Activity主要组件主模块IntentStarter在重建/编译时出现错误Error:(15,10)error:xyz.IntentStartercannotbeprovidedwithoutan@Injectconstructororfroman@Provides-or@Produces-annotatedmethod.xyz..MainActivity.intentStarter[injectedfieldoftype:xyz..IntentStarterinte

android - 房间 : related entities - usable public constructor

为了获得与Room的OneToMany关系,我创建了一个带有@Embedded对象和@Relation的POJO变量。dataclassSubjectView(@Embeddedvarsubject:Subject,@Relation(parentColumn="idWeb",entityColumn="subject_id",entity=Topic::class)vartopics:List?)但是在编译的时候出现了这个错误error:EntitiesandPojosmusthaveausablepublicconstructor.Youcanhaveanemptyconstruc

android - java.lang.InstantiationException : can't instantiate class : no empty constructor 异常

我正在尝试在Android上创建游戏,但我在View实例化方面遇到了问题。我正在使用膨胀View。这是我的View代码:publicclassGameViewextendsTableLayout{publicGameView(Contextcontext,AttributeSetattrs){super(context,attrs);}ActivitypublicclassGameActivityextendsActivity{privateGameViewview;@OverridepublicvoidonCreate(BundlesavedInstanceState){super.

在 LG 4G Stylus 上拍照后 Android 应用程序崩溃 "Unable to find the default constructor"

我的应用程序在LG4GStylus设备上拍照后崩溃。它在Galaxynexus、GalaxyS4、LG4G上运行良好。我不能Handlebars指放在上面,这让我发疯......我正在为我的图像使用viewpager并使用这些list配置:如果有人能帮助我,我将不胜感激!这里是异常:Causedby:md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable:System.NotSupportedException:UnabletofindthedefaultconstructorontypeEasyDeal_Android.Fragm

java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor at org.springf

 java.lang.IllegalArgumentException:Cannotpassnulloremptyvaluestoconstructor   atorg.springframework.security.core.userdetails.User.(User.java:113)   atorg.springframework.security.core.userdetails.User$UserBuilder.build(User.java:535)   atcom.example.mz.spingsecurity_jwt_deepstudy.SpingsecurityJwtD

java - 错误 : The constructor MainActivity. ScreenSlidePagerAdapter(FragmentManager) 未定义

我试图在http://developer.android.com/training/animation/screen-slide.html中实现一个android项目我在一节课上有一个错误importandroid.os.Bundle;importandroid.annotation.SuppressLint;importandroid.app.Activity;importandroid.app.Fragment;importandroid.app.FragmentManager;importandroid.content.Intent;importandroid.support.v

android - OSMdroid - 错误 : no suitable constructor found for Overlay(no arguments) constructor Overlay. 覆盖(上下文)不适用

在应用程序中扩展OSMdroidOverlay类时importorg.osmdroid.views.overlay.Overlay;...publicclassMapOverlayAreaextendsOverlayimplementsTextToSpeech.OnInitListener,OnTouchListener{...我收到一个错误:error:nosuitableconstructorfoundforOverlay(noarguments)constructorOverlay.Overlay(Context)isnotapplicable 最佳答

【异常解决】java.lang.IllegalStateException: No primary or single unique constructor found for interface

java.lang.IllegalStateException:Noprimaryorsingleuniqueconstructorfoundforinterfacejava.util.List的解决方案一、背景描述二、解决方案一、背景描述Springboot+vue3批量删除规则接口:前端请求如下后端服务接口请求的方法如下:结果报错,详情如下:java.lang.IllegalStateException:Noprimaryorsingleuniqueconstructorfoundforinterfacejava.util.List二、解决方案前端请求不变,后端服务接口请求的方法参数上添加