locked
ClassNotFoundException when rendering axml file RRS feed

  • Question

  • User109563 posted

    Hi,

    This bug is random (non systematic)

    I regularly get this error when trying to display a layout (axml) in design mode:

    ERROR: java.lang.ClassNotFoundException: mono.android.D3DImageFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ... INFO: No indirect rendering available INFO: Changing layoutlib, from 0 to 25

    The designer load indefinitely the axml file... and nerver renders it.

    When the bug occurs, then rendering doesn't work anymore, even on the simpliest layout in the world.

    Here is my configuration :

    Microsoft Visual Studio Professional 2017 Version 15.2 (26430.6) Release

    Microsoft .NET Framework Version 4.6.01586

    Xamarin.Android SDK 7.3.0.13 (448f54f) Xamarin.Android Reference Assemblies and MSBuild support.

    Thursday, May 18, 2017 1:55 PM

All replies

  • User324462 posted

    I have the exact same issue, same config. I have been struggling with this as well for a few days now. My project is a Cross-Platform (PCL). If I create a new project same dependencies, it works. Something with the existing project has broken, frustrating.

    Thursday, May 18, 2017 3:28 PM
  • User324827 posted

    I have this as well except it is systematic. It happens 100% of the time even from a fresh install and simply trying to open a Main.axml from the blank android app in the designer. I've reinstalled multiple times now, stepped through the install component by component and used sdk manager to update packages 1 by 1 in hopes of figuring this out but I'm out of ideas.

    I also spent some time looking in the github repo's for the reference to D3DImageFactory but turned up nothing. I'm new to Xamarin so I'm not sure what to look for exactly. I did find it odd that the MonoAndroid version being picked up is v1.0 but maybe that's expected?

    [I:]: Found Xamarin.Android 7.3.0.13 [I:sdk]: Runtime path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android [I:sdk]: Framework path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0 [I:sdk]: Key HKCU\SOFTWARE\Xamarin\VisualStudio\15.0185bbaf8\Android\AndroidSdkDirectory found: Path contains adb in \platform-tools (C:\Program Files (x86)\Android\android-sdk). [I:sdk]: Key HKCU\SOFTWARE\Xamarin\VisualStudio\15.0185bbaf8\Android\AndroidNdkDirectory found: Path contains ndk-stack in . (C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b). [I:sdk]: Key HKCU\SOFTWARE\Xamarin\VisualStudio\15.0185bbaf8\Android\JavaSdkDirectory found: Path contains jarsigner.exe in \bin (C:\Program Files\Java\jdk1.8.0131). [I:]: Found Android SDK. API levels: 23, 25

    Friday, May 19, 2017 3:56 AM
  • User109563 posted

    @ BryanJ,

    I did find it odd that the MonoAndroid version being picked up is v1.0 but maybe that's expected? Yes.

    I have this as well except it is systematic. It happens 100% of the time even from a fresh install. Outch... For my part, i just have to relaunch Visual Studio (and maybe remove .vs and obj folders). So it's ok.... And i work with jdk1.8.0_121 (64 bits) (only difference with your conf).

    Have you try to relaunch your computer ? Have you try the visual studio preview ?

    PS : maybe, you should skin you layout on Android Studio. Xml Syntax is 100% compatible, so... Good luck

    Friday, May 19, 2017 4:34 PM