Bug 33174 - Android M Preview 3 SDK Tools v24.3.4 breaks designer
Summary: Android M Preview 3 SDK Tools v24.3.4 breaks designer
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 5.1
Hardware: Macintosh Mac OS
: High major
Target Milestone: android-m-preview
Assignee: Stephen Shaw
: 33389 ()
Depends on:
Reported: 2015-08-17 15:45 UTC by Ben Beckley
Modified: 2015-09-04 16:33 UTC (History)
11 users (show)

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

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:

Description Ben Beckley 2015-08-17 15:45:44 UTC
The SDK tools released with Android M Preview 3 are causing an internal error when using the designer which is not allowing layouts to load.

>ERROR: java.lang.NoSuchMethodError: com.android.ide.common.rendering.api.HardwareConfig.<init>(IILcom/android/resources/Density;FFLcom/android/resources/ScreenSize;Lcom/android/resources/ScreenOrientation;Z)V

## Environment
Mac OS X 10.10.4
XS 5.9.5-9
XA 5.1.5-3
SDK Tools 24.3.4

Screenshot of error: 

Here is an IDE log from another machine experiencing the error:
Comment 1 tuomas.korjonen 2015-08-18 04:29:14 UTC
Designer works again  if you revert to 24.3 version of the tools
Comment 2 PJ 2015-08-18 11:21:25 UTC
We've consolidated information into a forum thread - https://forums.xamarin.com/discussion/48408/warning-android-sdk-tools-rev-v24-3-4?new=1

That includes the following workaround:

## Workaround ##

Downgrade your SDK tools to 24.3.3. 

Downgrade links



Downgrade steps

1. Locate the tools directory in the Android SDK path. One way to find the right directory is to open "Tools -> Open Android SDK Manager" in Xamarin Studio or "Tools -> Android -> Android SDK Manager" in Visual Studio. The tools subdirectory can be found within the "SDK Path" that is displayed at the top of the SDK Manager window.
2. Delete the tools directory.
3. Unzip the tools_r24.3.3.zip file into the "SDK Path", creating a directory named "tools". Be careful not to create an extra outer "tools" directory when unzipping this file: the top-level "SDK path" should contain tools/android, not tools/tools/android*.
Comment 5 Ben Beckley 2015-08-18 15:34:09 UTC
The fix in Comment 4 initially allowed the designer to work when using SDK tools v24.3.4 for a few seconds before crashing. After that, opening the designer causes an immediate crash. Also, when using SDK tools v24.3.3 there is a message asking to update to v24.3.4. I had it up for about a minute and there was no crash.

IDE log for crash with SDK tools 24.3.4:

Mac OS X 10.10.4
XS Version 5.10 (build 580)
XA (Enterprise Edition)
SDK Tools Version: 24.3.4
SDK Platform Tools Version: 23
SDK Build Tools Version: 23.0.0
Comment 6 Alan McGovern 2015-08-18 15:48:20 UTC
Can you try again? This crash looks unrelated to the changes we made.
Comment 7 Alan McGovern 2015-08-18 15:50:06 UTC
Can you also link the eact location where you got the build from and also attach the version info from Xamarin Studio -> About Xamarin Studio
Comment 8 Alan McGovern 2015-08-18 15:55:16 UTC
I did a quick scout. If you had a build which gave an error when loading an SDK older than 24.3.4 then you were using builds from the -mdaddins lane. These builds are known to crash as they link against the macOS 10.10 SDK.

Grab any build from monodevelop-lion-master built after 8:53 PM GMT (now) and test that. Those are non-crashy.
Comment 10 Alan McGovern 2015-08-18 16:03:26 UTC
Cool cool :) the first build with the fix on the regular lane will be hash 319ead02
Comment 11 Ben Beckley 2015-08-18 16:14:25 UTC
So, when using (319ead02) from monodevelop-lions-master the designer is working as expected. I did not experience any crashes on launch or when adding controls.

Version Info:
Comment 12 Stephen Shaw 2015-08-18 16:24:27 UTC
Thanks for testing that.
Comment 13 Ben Beckley 2015-08-19 12:25:25 UTC
Hi all, I have verified that the hotfix build works on Mac XS. 360Logica is running smoke tests on that and the other builds as well.


Comment 14 Mohit Kheterpal 2015-08-19 15:16:27 UTC
I have checked this issue on windows and Mac using updated Android SDK Tools 24.3.4. Now it is working fine. Android designer opens successfully on both windows and Mac using XS/VS.

Environment info:

Mac: Yosemite, Mavericks

Windows: 7 & 8.1
VS 2010/2013/2015
XVS 3.11.837
Comment 15 Sunil Kumar 2015-08-21 14:58:52 UTC
I have checked this issue on Mac and Windows using Android SDK Tools 24.3.4 and C5SR4 builds and now this issue working fine. 

Screencast of Mac: http://www.screencast.com/t/5xCbyzvjzOoa
Screencast of Windows: http://www.screencast.com/t/yCTkMTbAqeYo

Environment Info:
Mac build info: https://gist.github.com/RamChBachkheti/44c46c229a833c354388

Windows Build info:
XVS 3.11.886
VS 2013
Comment 16 Ashley Gazich [MSFT] 2015-09-04 16:33:18 UTC
*** Bug 33389 has been marked as a duplicate of this bug. ***