Bug 58976 - Error opening Main.axml
Summary: Error opening Main.axml
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 8.1 (15.5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jérémie Laval
URL:
Depends on:
Blocks:
 
Reported: 2017-08-23 15:43 UTC by joey
Modified: 2017-12-06 03:39 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
This is what comes up (92.14 KB, image/png)
2017-08-23 15:43 UTC, joey
Details
Main.axml (74.33 KB, application/x-zip-compressed)
2017-08-23 16:35 UTC, joey
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description joey 2017-08-23 15:43:50 UTC
Created attachment 24376 [details]
This is what comes up

This just started after the recent update. I can't open new or existing projects now. 


java.lang.NoClassDefFoundError: Could not initialize class mono.android.D3DImageFactory
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at mono.android.DesignerSession.initializePlatformSpecific(DesignerSession.java:86)
	at mono.android.DesignerSession.<init>(DesignerSession.java:75)
	at mono.android.Project.createSession(Project.java:382)
	at mono.android.Project.processMessage(Project.java:414)
	at mono.android.MessageListener.executeMessage(MessageListener.java:88)
	at mono.android.MessageListener$Runner.run(MessageListener.java:44)
	at java.lang.Thread.run(Thread.java:745)
Comment 1 Jon Douglas [MSFT] 2017-08-23 16:18:07 UTC
Can you please upload your logs from "Help -> Xamarin -> Zip Logs" and provide your version information via "Help -> About Visual Studio"

Secondly, is this Main.axml file have anything special in it? Or is it just a templated item? We might want a copy of that layout to see if we can reproduce it on our end once we can figure out your version information.

Thank you for your report and we look forward to hearing from you!
Comment 2 joey 2017-08-23 16:35:59 UTC
Created attachment 24379 [details]
Main.axml

Hi, 

    Thank you for fast response.

Microsoft Visual Studio Community 2017 
Version 15.3.2
VisualStudio.15.Release/15.3.2+26730.10
Microsoft .NET Framework
Version 4.6.01055

Visual Basic 2017   00369-60000-00001-AA351


Xamarin   4.6.0.299 (b63523e27)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.4.0.21 (2851083)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.12.0.20 (80b8487)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.


This is just a new blank project.
Comment 3 joey 2017-08-23 20:01:58 UTC
I have tried:
 
 A new layout, 
 Upgrading my JDK
 Changing my JDK version in visual studio
 reinstalling Visual Studio 
 reinstalling Xamarin
Comment 4 joey 2017-08-23 20:27:08 UTC
I uninstalled 
  ALL Java
  ALL Java updates
  ALL Java JDK's

Installed jave x64
Installed jdk x64 

It worked!!

Looks like it is an issue
https://stackoverflow.com/questions/45347705/not-able-to-open-xamarin-layout-in-net-framework
Comment 5 Jon Douglas [MSFT] 2017-08-23 21:17:25 UTC
(In reply to joey from comment #4)
> I uninstalled 
>   ALL Java
>   ALL Java updates
>   ALL Java JDK's
> 
> Installed jave x64
> Installed jdk x64 
> 
> It worked!!
> 
> Looks like it is an issue
> https://stackoverflow.com/questions/45347705/not-able-to-open-xamarin-layout-
> in-net-framework

Glad it's working. There is a release note of requiring a x64 version of JDK 1.8:

https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.0/
Comment 6 Munirah Hamzah 2017-12-06 03:39:30 UTC
Greetings

I have encountered same problem with this error message while open main.axml in designer tab.

java.lang.NoClassDefFoundError: Could not initialize class mono.android.D3DImageFactory
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at mono.android.DesignerSession.initializePlatformSpecific(DesignerSession.java:86)
	at mono.android.DesignerSession.<init>(DesignerSession.java:75)
	at mono.android.Project.createSession(Project.java:382)
	at mono.android.Project.processMessage(Project.java:414)
	at mono.android.MessageListener.executeMessage(MessageListener.java:88)
	at mono.android.MessageListener$Runner.run(MessageListener.java:44)
	at java.lang.Thread.run(Thread.java:748)

I'm using 32-bit windows , JDK 1.8.0_151. 
My visual studio version as below :

Microsoft Visual Studio 2017 Professional
Version 15.3.5

Microsoft .NET Framework
Version 4.7.02053
Xamarin - 4.7.9.45
Xamarin-Android SDK - 7.4.5.1(fb018c5)