Error when trying to instantiate class in Xamarin.Forms - xamarin.forms

Using VS 2017 and Xamarin.Forms, has anyone seen an error like this?
{Java.Lang.ClassNotFoundException} Java.Lang.ClassNotFoundException
Didn't find class "md546f3e293680064826a8f4de8cb5b1ad9.ZebraTC75" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
In the output pane, I get the following:
09-30 10:39:44.712 I/art ( 9673): Rejecting re-init on previously-failed class java.lang.Class md546f3e293680064826a8f4de8cb5b1ad9.ZebraTC75
I have multi-dex off. seems ZebraTC75 class could not be found. Am I missing a setting to include?
This class is in my Android project.
This class also is inherited from a "Base" class.
The error appears in debug mode when i step into the constructor of the "base" class.
Thanks,
Austin

Related

Proguarding a Javafx application using slf4j logger

I previously built a Javafx application and successfully wrapped it with proguard, while using java.util.Logger. However, I need to switch from java.util.Logger to the Logger provided by slf4j and use qos-logback. When I use proguard on it, I run into an array of warnings, all generated from either of the slf4j or the qos-logback library. Some of the (MANYYY) warnings are:
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletResponse
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletRequest
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletResponse
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletRequest
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletResponse
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletRequest
Warning: ch.qos.logback.core.status.ViewStatusMessagesServletBase:
can't find referenced class javax.servlet.http.HttpServletResponse
Warning: org.slf4j.MDC: can't find referenced method
'org.slf4j.impl.StaticMDCBinder getSingleton()' in program class
org.slf4j.impl.StaticMDCBinder
Warning: org.slf4j.MarkerFactory:
can't find referenced method 'org.slf4j.impl.StaticMarkerBinder
getSingleton()' in program class org.slf4j.impl.StaticMarkerBinder
Note: ch.qos.logback.classic.gaffer.GafferUtil accesses a constructor
'(ch.qos.logback.classic.LoggerContext)' dynamically
If you notice, some of the warnings are even repeating. I will be really grateful if anyone can help me out regarding this, even if it's just pointing me in the right direction since I've been stuck on it for a while. Many thanks in advance.
After a lot of effort, I sort of got things done.
I had to add the following to the config:
-keep,allowshrinking class ch.qos.logback.core.status.ViewStatusMessagesServletBase {
<fields>;
<methods>;
}
I also needed to inspect the warnings to find the source and had to add servlet-api.jar separately as a library.

The definition for "knp_paginator" has no class

hi i installed the KnpPaginatorBundle in py project and i flow all the steps in the documentation, the problem is when i open the page i got this exception :
RuntimeException in CheckDefinitionValidityPass.php line 63: The
definition for "knp_paginator" has no class. If you intend to inject
this service dynamically at runtime, please mark it as synthetic=true.
If this is an abstract definition solely used by child definitions,
please add abstract=true, otherwise specify a class to get rid of this
error.

How to make correct S4 Class declaration for a package

I am creating a personal package with some S4 classes. When I run the Build and Reload button in the Rstudio IDE I get the next message.
in method for ‘checkNewItems’ with signature ‘"webSource"’: no definition for class "webSource"
The Class declaration webSource is in a different file where the checkNewItems method is and I am guessing that is the reason why I am getting that message. In the source code that I have makes more sense to have the class declaration in other place rather than next to the methods checkNewItems.
Which is the idiomatic workaround that R programmers use for this?
Also, from the point of view of the Lazyloading that R uses I assumed that this should not happen.
You should export your class. In your namespace file you add this:
exportClasses(webSource)

ERROR accessing objects that inherit from abstract classes in WF4

Is it possible classes that derive from an abstract base class cannot be used in WF4? I have a library that define several object classes... I'm able to access objects in that library just fine except for objects that inherit from an abstract class.
Each time I reference the abstract class or any other classes in its inheritance chain, I get the following error:
"Compiler error(s) encountered processing expression "cust.DisplayName". 'cust' is not declared. It may be inaccessible due to its protection level."
In this case 'cust' is an instance of a CustomerAccount class which inherits from an AccountEntity (abstract) class which in turn inherits from a BaseEntity (abstract) class...
I can do the following in a C# console application and it works just fine:
CustomerAccount cust = new CustomerAccount();
cust.DisplayName = "John Doh";
Console.WriteLine("Out Put: " + ((iSvrBaseEntity)cust).DisplayName);
Console.WriteLine("Entity Type: " + cust.entityType);
But in the WF4 designer, I'm allowed to instantiate Cust and I'm allowed to assign another object to cust... but when I try to access a property in cust (or assign a value to one of it's properties, the error occurs.
Has anyone encountered this? Is it by design that WF4 doesn't deal with such inheritance? Is there a workaround?...
Thanks!
Types used need to be public but other than that any normal .NET type should work just fine.

ActionScript: Type coercion problem with BlazeDS/AMF and class interfaces

I've got a problem with type coercion in a Java/Hibernate/BlazeDS/Flex-Setup.
First of all, my classes look like this:
--- JAVA ---
Interface I
(Abstract) Class A implements I
Class B extends A
--- ActionScript ---
Interface I
Class A implements I
Class B extends A
I got RemoteClass-Meta-Tags in all ActionScript-Classes/Interfaces I, A and B. Package structure and Class/Interface names are exactly the same.
Now here's the problem:
My Java Service successfully retrieves objects of class B from my database via Hibernate. I got another class C which has a member property of interface type I, so it should be possible to assign an object of type B. But for some reason i get the following error message:
TypeError: Error #1034: cannot convert Object#28b44a89 to package.name.I
I checked the Java object type in the service and it is of type B and seems to be totally fine. Why can't the object of type B be assigned to a member variable of type I? This is driving me nuts.
Thanks in advance.
Check the type the objects returned by the service call (inspect the result with a debugger in Flash Builder). Maybe they are not properly converted to type B and an ObjectProxy is created. If it's not the case, please post your code.
I got same strange issue.
My situation like this:
I develop an web application with Flex 4 + Spring
In Java, I have class Message.
In Flex, I have class Message.
When getting remote java object from server and cast to Message type in Flex, this error will occur. The strange thing is that, on the first time, it's OK to cast to Message type in Flex from remote java object and there's no error; but in the second time, it fail and error will be shown.
To solve this, I have one solution: using registerClassAlias() method to register for remote java class.
But I wonder if there's other solution for this issue. Is this a bug of Flex?

Resources