REQUIRES XAMARIN UPDATE: Android SDK Tools rev 24.3

BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
edited June 2015 in Xamarin.Android

Google just released a new version of Android SDK Tools (rev. 24.3). This version breaks the Xamarin.Android designer: Bug 30556.

Update June 2: fix for Bug 30556 now available in the Stable channel

The fix for the designer Bug 30556 has now been released to the Stable channel:

  • Xamarin for Visual Studio 3.11.586
  • Xamarin Studio 5.9.2.4

If you still see Bug 30556 after updating, or if you find any additional bugs caused by Android SDK Tools (rev. 24.3), please file a bug report and add a comment back on this thread with the bug number. Thanks! (If that link redirects to the top-level kb.xamarin.com/ page the first time you click it, try clicking it once more.)

Alternate workaround

If you do not yet wish to upgrade your XamarinVS or Xamarin Studio version, or if you run into any additional bugs with rev 24.3 other than Bug 30556, you can downgrade the Android SDK Tools.

Downgrade links

Windows

Mac

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.2-*.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*.

Error message

The layout could not be loaded: The operation failed due to an internal error: com.android.ide.common.rendering.api.SessionParams.(Lcom/android/ide/common/rendering/api/ILayoutPullParser;Lcom/android/ide/common/rendering/api/SessionParams$RenderingMode;Ljava/lang/Object;Lcom/android/ide/common/rendering/api/HardwareConfig;Lcom/android/ide/common/rendering/api/RenderResources;Lcom/android/ide/common/rendering/api/IProjectCallback;IILcom/android/ide/common/rendering/api/LayoutLog;)V.

Screenshots

Xamarin Studio

image

Visual Studio

image

Posts

  • CharlesJapaCharlesJapa USMember, University

    Thanks Brendan. This solve the problem!

  • PatrickKeenanPatrickKeenan USUniversity ✭✭

    Very helpful. Just wish I would have known before I clicked the update button. Thank you for the fix.

  • Steve_WilliamsSteve_Williams AUBeta ✭✭

    If we don't use Designer, everything is ok?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    If we don't use Designer, everything is ok?

    Quick spot-checks of building, deploying, and debugging seem to work OK. On the other hand, keep in mind that Google does not provide preview releases of new versions of Android tools, so the Xamarin QA team has only been testing this new version starting on May 28. As a result there could be additional breakages that have not yet been discovered by the Xamarin QA team. In theory, even after a full Xamarin QA pass, there could still be some lurking edge cases that will cause errors for some customers. Customer reports of those edge case failures are much appreciated! (If that link redirects to the top-level kb.xamarin.com/ page the first time you click it, try clicking it once more.)

  • Thank you for this post. The workaround has worked for me. Can't wait for the hotfix! Thanks!

  • MichaelPMichaelP ATMember ✭✭

    You saved my day... thanks

  • CarlosCoraCarlosCora USMember

    where I put the files ( tools) ... that route ?

  • osoykanosoykan USMember

    Very nice touch, thanks.

  • UmarAliUmarAli PKMember

    Thanks a lot it works perfect. i faced this difficulty from last 2 or 3 days now it solve

  • ErhanAlankusErhanAlankus TRMember

    Thanks for the fix. Can you send us e-mails for these kinds of stuff?

  • Desarrollo.0454Desarrollo.0454 USMember

    In any case it is better Android Native

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Update June 2: fix for Bug 30556 now available in the Stable channel

    See the first post in the thread for a few additional details.

  • lyrc.csslyrc.css USMember

    you save my date :smiley:

  • Sajjad.SarkoobiSajjad.Sarkoobi USMember ✭✭

    After I have Updated my xamarin studio to Version 5.9.1 (build 3) each time i made change in alternative layouts , after one build or rebuilding program that layout goes down!!! and when i want to open it xamarin show me this error :

    "Object reference not set to an instance of an object"

    but i can still build and run my program and it works well but i cant reach to any layout editor of that axml file,!! other axml files works fine....
    I'm so confused :neutral:
    please help.

  • Sajjad.SarkoobiSajjad.Sarkoobi USMember ✭✭
    edited June 2015

    Oh , I have solved it

    in each folder size layout , i open that layout with source editor , and at the end of code
    i see these:
    <!-- Property Change Conflict | source:normal-port, id:__root__ | [email protected]/background22 --> <!-- Property Change Conflict | source:small-port, id:__root__ | [email protected]/background22 --> <!-- Property Change Conflict | source:xlarge-port, id:__root__ | [email protected]/background22 --> <!-- Property Change Conflict | source:small-port, id:@+id/relativeLayout1 | background removed --> <!-- Property Change Conflict | source:normal-port, id:__root__ | alpha=0.2 -->

    so i delete these codes in each axml source and then its going back to life with layout editor ..
    :smile: :smiley:

  • vecodevecode DEMember

    I'm using Xamarin3 version 3.11.599.0 and android sdk tools version 24.3.2 and still have this issue. I tried downgrading but that didn't work either. I'm getting an error saying my android sdk tools are too old after downgrading.
    Any ideas how to fix this?

  • aurangzebaurangzeb USMember

    I extend my trial version of android but still i get this error

    Can anyone know how to fix it ?

    Thanks in advance

  • ConorODohertyConorODoherty IEMember

    After downgrading my android sdk tools I get this error when opening a layout.

    "The installed Android SDK is too old. Version 24.3 or newer is required. Please update to the latest version"

  • MihailsMozajevsMihailsMozajevs GBMember

    I have same question as ConorODoherty

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    The dependency works both ways: Xamarin 3.11.586 and higher and Xamarin Studio Xamarin Studio 5.9.2.4 and higher require updating to Android SDK Tools rev 24.3 or higher.

  • RobertHaiderRobertHaider USMember

    After I installed Xamarin 3.11.586, Visual Studio 2015 RC could not recognize Xamarin projects. It wouldn't load the project in VS solution stating that the version of the project was unsupported by Visual Studio 2015 RC. Repair operation on VS did not fix the problem. Had to uninstall Xamarin and then uninstalling and re-installing VS fixed the problem where the Xamarin projects were being recognized by VS. However this exercise, of course, did not fix the problem with the AXML designer.

  • MartinH.6109MartinH.6109 USMember

    Thank you .. It's work!

  • BharathVarmaBharathVarma USMember

    Worked like a charm. Thanks, Brendan :smile:

  • RajasekharRajasekhar INMember

    Thanks Brendan. This solve the problem :smile:

  • metinatalaymetinatalay TRMember

    Thanks . Bro

  • SDarRcKSDarRcK ESMember

    Alguno de Ustedes podia ayudarme con este problema

    The layout could not be loaded: The operation failed due to an internal error: com.android.ide.common.rendering.api.HardawareConfig.(llLcom/android/resources/Density;FFLcom/android/resources/ScreenSize;Lcom/android/resources/ScreenOrientation;Z)V.

    Se los agradeceria mucho :smiley:

  • BorisLeclere.5012BorisLeclere.5012 FRMember
    edited August 2015

    Hi all,

    It's not work for me, get this error :
    => The installed Android SDK is too old. Version 24.3 or newer is required. Please update to the latest version.

    I'm on Mac OS X 10.10.4, Xamarin Studio is up to date.

    It is possible to downgrade Xamarin Studio ?

    Another point, after replace Android SDK tools directory, i cannot launch Android SDK Manager with Xamarin (Tools -> Open Android SDK Manager). It must be done with command line.

    Thanks

  • SDarRcKSDarRcK ESMember

    Muchas gracias pero no funciono :/ alguna otra opcion que me puedan dar??? :(

  • JoeHJoeH USMember

    I see the same error as Rober mentions above. Which is similar but I do not think is the same issue.

    The layout could not be loaded: The operation failed due to an internal error: com.android.ide.common.rendering.api.HardawareConfig.(llLcom/android/resources/Density;FFLcom/android/resources/ScreenSize;Lcom/android/resources/ScreenOrientation;Z)V.

    I get this in VS 2013 Update 5 and also in VS 2015.

    Version 12.0.40629.00 Update 5

    Xamarin 3.11.836.0 (ed5c750)
    Xamarin.Android 5.1.5.3 (f98871a95a479f6d71b3067b7e5834d41fcb2118)
    Xamarin.Forms Intellisense 1.0
    Xamarin.iOS 8.10.4.0 (6db87c53c073f4af2f5247fb738a27ea08c094fd)
    Xamarin.iOS Unified Migration 1.0
    Xamarin.TestCloud.Integration 1.0

  • SDarRcKSDarRcK ESMember

    Thanks! for the workaround and i found that here :

    https://forums.xamarin.com/discussion/48408/warning-android-sdk-tools-rev-v24-3-4

    Close ALL instances of Visual Studio and/or Xamarin Studio
    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.
    Delete the tools directory.
    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*.

  • JoeHJoeH USMember

    Gracias Rober ... ese era el problema

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Google has released another new version of the SDK Tools (24.3.4) that again breaks the Android designer. As SDarRcK mentioned, there is a new forum announcement for that new breakage:

    https://forums.xamarin.com/discussion/48408/warning-android-sdk-tools-rev-v24-3-4.

    I will close this forum thread accordingly because most users will now be hitting that new problem rather than this older problem. See the new forum thread for the latest information on the new problem.

This discussion has been closed.