"Something Went Wrong" when creating project

Asked

Viewed 83 times

0

I created an android Xamarin project - the xml is as it came, I have not written any line on anything yet, but I can’t see the design:

screenshot de erro no visual studio

com.google.gson.Jsonsyntaxexception: java.lang.Illegalstateexception: Expected BEGIN_ARRAY but was STRING at line 1 column 1 at com.google.gson.Gson.fromJson(Gson.java:815) at com.google.gson.Gson.fromJson(Gson.java:768) at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getLibsFromJson(Localplatformpkginfo.java:402) at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getOptionalLibraries(Localplatformpkginfo.java:384) at com.android.sdklib.repository.local.LocalPlatformPkgInfo.createAndroidTarget(Localplatformpkginfo.java:251) at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getAndroidTarget(Localplatformpkginfo.java:104) at com.android.sdklib.repository.local.LocalSdk.getTargets(Localsdk.java:712) at com.android.sdklib.SdkManager.getTargets(Sdkmanager.java:181) At mono.android.Androiddesignerhost.getAndroidTarget(Androiddesignerhost.java:87) Designersession.initialize(Designersession.java:107) mono.android.Project.createSession(Project.java:401) mono.android.Project.processMessage(Project.java:432) At mono.android.Messagelistener.executeMessage(Messagelistener.java:88) Messagelistener$Runner.run(Messagelistener.java:45) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.Illegalstateexception: Expected BEGIN_ARRAY but was STRING at line 1 column 1 at com.google.gson.stream.Jsonreader.beginArray(Jsonreader.java:338) at com.google.gson.internal.bind.Collectiontypeadapterfactory$Adapter.read(Collectiontypeadapterfactory.java:79) at com.google.gson.internal.bind.Collectiontypeadapterfactory$Adapter.read(Collectiontypeadapterfactory.java:60) at com.google.gson.Gson.fromJson(Gson.java:803) ... 14 more

  • 1

    where your code?

1 answer

1

You need the 64bit version of java installed. Also, update the Xamarin version. Install Android Api 25, Build Tool 25.0.x, and Platform-tools 25.0.x

(Note that there may be updates to these tools)

This type of error relates to Build Tools versions of Android.

(Taken from the Montemagno Post) http://motzcod.es/post/157589380047/xamarin-cycle-9-preparing-machines

Browser other questions tagged

You are not signed in. Login or sign up in order to post.