Cause: javax.xml.bind.UnmarshalException: Unable to create an instance of com.android.repository.impl.generated.v1.TypeDetails Android

Viewed 3041

Suddenly, i am getting an error: Cause: javax.xml.bind.UnmarshalException: Unable to create an instance of com.android.repository.impl.generated.v1.TypeDetails in android studio. Whenever i am trying to make a build it is showing this error. Thanks

2 Answers

Try running the android studio as an administrator, it worked for me.

In case it might be helpful for others, I saw this error when Android Studio didn't have write permissions for the Android SDK Location that I had set under File > Settings > Appearance & Behavior > System Settings > Android SDK.

I had originally set the Android SDK Location to a directory in C:\Program Files (x86):

Android Studio settings showing Android SDK Location

Android Studio couldn't write to that directory without administrator privileges, so I set the Android SDK Location back to the default location under my user directory and let Android Studio set it up.

After that, File > Sync Projects with Gradle Files completed successfully instead of stopping on the "javax.xml.bind.UnmarshalException: Unable to create an instance of com.android.repository.impl.generated.v1.TypeDetails" error.

Related