Application类的NoClassDefFound(NoClassDefFound from Application class)
我已经被攻击了几个小时了,我正在初始化我的Controller.java类中的一些代码,我从我的应用程序类调用它,它在所有设备上提前工作但是从昨天开始我在lolipop以下的设备上获得NoClassDefNotFound异常..i没有更改此文件中可能触发它的任何内容
my ApplicationClass code: .. onCreate(..){ .. Controller.init(this); .. }
它是正确导入没有错误,它具有以下代码:
public class Controller { .. public static final void init(Context context) { mRequestQueue = Volley.newRequestQueue(context); } .. }
包名称是正确的,我已经清理,重建,无效缓存和重新启动,重新启动工作室,重新计算机..我已经尝试了一切似乎没有工作。
我现在被打了几个小时,没有什么工作..
代码在棒棒糖(Android 5.0)上工作正常,但在棒棒糖(Android 5.0)下崩溃
请帮帮我
I have been struck on at a point for hours now, i was initializing some code in my Controller.java class that i called from my application class, it was working earlier on all devices but since yesterday i am getting NoClassDefNotFound exception on devices below lolipop..i have not changed anything in this file that may have triggered it
my ApplicationClass code: .. onCreate(..){ .. Controller.init(this); .. }
it is imported correctly has no error and it has the following code:
public class Controller { .. public static final void init(Context context) { mRequestQueue = Volley.newRequestQueue(context); } .. }
Package name is correct , i have cleaned,rebuild,invalidated cache and restarted,restarted studios,restated computer.. i have tried everything nothing seems to work.
i am struck for hours now, nothing is working..
code works fine on lollipop (Android 5.0) but crashes below lollipop (Android 5.0)
please help me out
原文:https://stackoverflow.com/questions/31686539
最满意答案
我遇到这样的问题。 以下步骤可帮助您1.右键单击服务(在项目的服务参考部分中)2。在更新服务参考中,单击高级3.执行附加图像。
Wanted to come back and post what was causing my problem:
I had made changes and none of my service methods used the 3 "missing" classes as a return type or parameter anymore. I simply had to un-comment the methods that used those classes to make them usable again. Makes sense now but I was convinced something else was wrong.
相关问答
更多-
对于faultHandling,请使用选项/ useSerializerForFaults以避免重复 The above problem has been removed when i pass /importXmlTypes parameter to the svcutil.exe.
-
如何在Web Reference中继承类?(How to subclass a class in Web Reference? (class is in reference.cs))[2023-12-23]
二手AutoMapper.dll ......就像一个魅力! Used AutoMapper.dll... worked like a charm! -
有时候添加WCF服务引用会生成一个空的reference.cs(Sometimes adding a WCF Service Reference generates an empty reference.cs)[2021-11-08]
一般来说,我发现这是一个代码问题, 大部分时间是因为我有一个类型名称冲突无法解决。 如果您右键单击服务引用并单击配置并取消选中 “重新使用引用的程序集中的类型”,则可能会解决此问题。 如果您使用此功能的某些方面,您可能需要确保您的名称已被清理。 Generally I find that it's a code-gen issue and most of the time it's because I've got a type name conflict it couldn't resolve. If y ... -
AFAIK C#属性语义未在描述Web服务的元数据中表示。 这些元数据位于WCF生成的不同XML模式文件(带有“.xsd”扩展名)中。 您可以添加到数据类型的RIA属性也是如此。 解决方案是通过共享嵌入类型的DLL来让客户端了解它们。 您可以创建第三个项目“Data”来保存数据类并从服务器和客户端项目中引用它。 AFAIK C# properties semantics is not represented in the meta-data describing a web-service. These m ...
-
在研究了这个问题之后,我在这里遇到了这个问题。 我还发现reference.cs文件在我的情况下也是空的。 从“配置服务引用”对话框中取消选中Reuse types in referenced assemblies后,我能够成功生成服务引用客户端代码。 我的服务引用现在指向正确的接口/成员。 如有任何疑问,请随时发表评论或直接与我联系。 I came across this question here after researching on this issue. I also found out tha ...
-
我遇到这样的问题。 以下步骤可帮助您1.右键单击服务(在项目的服务参考部分中)2。在更新服务参考中,单击高级3.执行附加图像。 Wanted to come back and post what was causing my problem: I had made changes and none of my service methods used the 3 "missing" classes as a return type or parameter anymore. I simply had to ...
-
配置服务引用对话框使您可以配置生成的代理的行为。 这包括配置用于集合和词典的类型的选项。 如果IDictionary不在那里,您可能无法生成从Visual Studio中使用它的代理。 但请记住,生成的客户端只需以商定的格式交换数据。 如果您可以使用包含服务合约(或服务合同格式正确)的程序集,则可以使用渠道工厂生成客户端。 通过网络发送的数据格式将相同,因此与您的服务兼容。 你可以在这里看到一个渠道工厂的简单例子。 The Configure Service Reference dialog box ena ...
-
您可以尝试手动更新reference.cs文件以使用字段替换属性。 如果引用不是以某种方式配置为使用字段而不是属性,我愿意打赌这是以前的作者所做的。 You can try manually updating the reference.cs file to replace the properties with fields. I'd be willing to bet that's what the previous authors did if the reference isn't already ...
-
您可以右键单击已创建的服务参考,然后单击Configure service reference...选项。 在DataType部分UnCheck Reuse types in referenced assemblies集中的Reuse types in referenced assemblies you can rightclick in the service reference created and click the Configure service reference... option. in ...
-
问题是该工具使用了不正确的xml命名空间。 请参阅400 Bad Request Exception中更正的wsdl :带有小数据的简单SOAP WCF服务 The issue was with incorrect xml namespace used by the tool. Please see the corrected wsdl in 400 Bad Request Exception: Simple SOAP WCF service with small data