This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 44108 - Can't load AMD 64-bit.dll on a IA 32-bit platform when starting Android designer
Summary: Can't load AMD 64-bit.dll on a IA 32-bit platform when starting Android designer
Status: RESOLVED DUPLICATE of bug 44269
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android Designer (show other bugs)
Version: 4.2.0 (C8)
Hardware: PC Windows
: Normal major
Target Milestone: 4.2.1 (C8SR1)
Assignee: Jérémie Laval
URL:
Depends on:
Blocks:
 
Reported: 2016-09-08 13:11 UTC by Hrvoje
Modified: 2016-09-23 00:59 UTC (History)
7 users (show)

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


Attachments

Description Hrvoje 2016-09-08 13:11:01 UTC
I'm getting:
Can't load AMD 64-bit.dll on a IA 32-bit platform when starting Android designer.
After that I switch to code and back to designer and it works two, three times.
After that when I try to load another layout it never loads, always shows progress bar "loading"...

I'm using beta 7.

My configuration is:

JDK
C:\Program Files (x86)\Java\jdk1.7.0_79

SDK
C:\Android-SDK (version 25.1.7)

NDK
C:\Program Files\Android\ndk\android-ndk-r11c

JRE
7.0.79
Comment 1 Hrvoje 2016-09-09 15:37:49 UTC
And here is complete error:

mono.android.DesignerException: C:\Program Files (x86)\MSBuild\Xamarin\Android\libmono-android.debug.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
	at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:175)
	at mono.android.DesignerSession.load(DesignerSession.java:225)
	at mono.android.DesignerSession.processMessage(DesignerSession.java:784)
	at mono.android.MessageListener.executeMessage(MessageListener.java:88)
	at mono.android.MessageListener$Runner.run(MessageListener.java:45)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\MSBuild\Xamarin\Android\libmono-android.debug.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
	at java.lang.Runtime.load0(Runtime.java:795)
	at java.lang.System.load(System.java:1062)
	at mono.android.SessionProjectCallback.tryLoadMonoDroid(SessionProjectCallback.java:454)
	at mono.android.SessionProjectCallback.initializeMonoDroid(SessionProjectCallback.java:472)
	at mono.android.SessionProjectCallback.getRenderClassLoaderForVersion(SessionProjectCallback.java:279)
	at mono.android.SessionProjectCallback.loadView(SessionProjectCallback.java:178)
	at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:247)
	at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:171)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
	at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)
	at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
	at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
	at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
	at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:229)
	at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
	at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
	at mono.android.DesignerSession.load(DesignerSession.java:210)
	... 4 more
Comment 2 Hrvoje 2016-09-09 19:00:19 UTC
After beta 7.0.0.15 install this issue no longer appears.
Comment 3 Hrvoje 2016-09-12 05:54:33 UTC
After some time, this bug started appearing again.
Comment 4 Francesco Colombo 2016-09-14 09:35:25 UTC
After installing the last stable release of Xamarin for Visual Studio, I get this same error.
Comment 5 Hrvoje 2016-09-14 11:13:28 UTC
I solved it by unistalling 32 bit and installing 64 bit version Java JDK and JRE 8 u 101 but not completelly.
I can now open 4-5 layouts in Android designer, previously I was able only up to 2 layouts and after that it had stopped responding.

I'd like Xamarin Team to look more into that problem since Android designer became almost unusable.
Comment 6 Jérémie Laval 2016-09-14 15:35:50 UTC

*** This bug has been marked as a duplicate of bug 44269 ***
Comment 7 Jérémie Laval 2016-09-14 15:37:02 UTC
Yes, as you mentioned Hrvoje the workaround is to install a 64bits version of the JDK/JRE on your machine. The problem will only appears if your layout contains custom controls (Java or C#).

This will be fixed in the next service release.
Comment 8 Jérémie Laval 2016-09-14 16:00:28 UTC
Fixed in version 6.2.0.490 (master)

Author: Jérémie Laval
Commit: e4c34671ac09f633469aff4f61cccf05bfd6234a (xamarin/md-addins)
Included in Commit: 836516fd28d81cda5c3925ab211a4145060b2fcd (mono/monodevelop)

Note You need to log in before you can comment on or make changes to this bug.