Italo Pessoa
Italo Pessoa

Reputation: 179

Xamarin - Classes not found (android support library)

I'm trying to implement Material Design with backward compatibility using AppCompat.

Following the tutorial.

But I'm getting the following error

Error 1 error: package android.support.v4.app.FragmentManager does not exist android.support.v4.app.FragmentManager.OnBackStackChangedListener C:\Users\Italo\Documents\Xamarin\TemaMaterial\TemaMaterial\obj\Debug\android\src\mono\android\support\v4\app\FragmentManager_OnBackStackChangedListenerImplementor.java 8 41 TemaMaterial Error 2 error: package android.support.v4.content.Loader does not exist android.support.v4.content.Loader.OnLoadCompleteListener C:\Users\Italo\Documents\Xamarin\TemaMaterial\TemaMaterial\obj\Debug\android\src\mono\android\support\v4\content\Loader_OnLoadCompleteListenerImplementor.java 8 36 TemaMaterial Error 3 error: package android.support.v4.content does not exist public void onLoadComplete (android.support.v4.content.Loader p0, java.lang.Object p1) C:\Users\Italo\Documents\Xamarin\TemaMaterial\TemaMaterial\obj\Debug\android\src\mono\android\support\v4\content\Loader_OnLoadCompleteListenerImplementor.java 27 56 TemaMaterial

It says that the package does not existe, but it exists. I still can't add images, so, here is the link

Upvotes: 3

Views: 3576

Answers (2)

JavaadPatel
JavaadPatel

Reputation: 97

I had a similar issue to yours and resolved it by:

  1. Downloading the "android_m2repository_r22.zip" at "https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip"
  2. Create a folder called "content" in the directory "C:\Users\Javaad\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.0.1.3", yours will have a different user name.
  3. Then extract the contents of that zip file into the "content" folder.
  4. Clean your project
  5. Build

Hope this helps.

Upvotes: 3

Italo Pessoa
Italo Pessoa

Reputation: 179

Apparently the problem occur because the zip file android_m2repository_r14 is corrupted. So is necessary download manually and unzip at %localappdata%\Xamarin\Android.Support.v4 and %localappdata%\Xamarin\Android.Support.v7.AppCompat folders

I also installed Google APIs and Sources for Android SDK

Upvotes: 3

Related Questions