Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Xamarin.Android.Support.v4 problem.

MaciekAciekMaciekAciek USMember
edited November 2016 in Xamarin.Android

Hello.
I'm trying to use ZXing.Net.Mobile package in my Xamarin.Android project (Visual Studio 2015). However, I have found some problems with it.
First thing, I cannot build my project after installation of a package (does not matter if I install it directly from Nuget Package Manager or by using Components store).
In my opinion there is a problem with 'Xamarin.Android.Support.v4', which is connected with ZXing.Net.Mobile.

Now some specific informations. Application properties:

  • Compile using Android 5.0 (my device),
  • Minimum Android to target: 4.1 (I cannot change this, since it is a project requirement)
  • Target Android version - Use Compile using SDK version.

List of errors in error list:

  • error: package android.support.v4.app does not exist (extends android.support.v4.app.FragmentActivity )
  • error: package android.support.v4.app.FragmentManager does not exist (android.support.v4.app.FragmentManager.OnBackStackChangedListener)
  • a lot of similar ones

However, if I do 'clean solution' and then click 'rebuild' I receive following error:

Actually, I downloaded the file, put this zip in specified directory. Moreover, I copied the file to 'PATH\AppData\Local\Xamarin\zips' folder, which seems to be OK.

Thanks,
Maciek

Posts

  • AziziAzizAziziAziz USMember ✭✭

    Hi Maciek,

    Try this solution :

    Rename the the Xamarin folder in C:\Users[YourUserName]\AppData\Local

    Just rename it as anything you like. Then, after renaming it, rebuild your project. VS will create back the Xamarin folder for you. It can takes up 15 - 30 minutes. It can be longer or shorter depending on the projects and the references you have. Be patience!

    Once the rebuilding completes, try to run your project again.

    It's not 100% working. But it works for me almost all the time. If it's not working the first time you tried, repeat the whole process over again. Remember, be patience.

    Hope this helps. :smiley:

    Regards,
    AziziAziz

  • MaciekAciekMaciekAciek USMember

    I will try. However, I am worried, that this action can corrupt my Visual Studio. Before I try I will do the backup.

    Anyway, thank You for your response :smile:

    Regards,
    MaciekAciek

  • lukasrein97lukasrein97 USMember ✭✭✭

    Error download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the PATH\Xamarin.Android.Support.v4\23.0.1.3 directory.

    This is a popular issue. I already created a thread how to reslove that. It means that you have installed the component but it couldnt download the nessasary resources for some reason nobody knows.

    Here some snippets of my Thread:
    Sloution1 :

    You should: 1-Download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip 2-Go to: (In my Case the followin Link but you should see your direction in the errorlog after you try to build your Application) /Users/AppData/Xamarin/Android.Support.Design/23.2.1.0/content 3-unzip the downloaded zipfile here in this direction.

    If this doesnt work then here is Solution2:

    Download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
    Then go [username]\AppData(hidder folder)\Local\Xamarin\zip
    and delete any zip file from there. then rebuild you project and go back to Xamarin\zip and now you should found there something like 96659D653BDE??????????.zip file which visual studio try to download. stop the build now and copy the downloaded r28.zip in this direction and rename that file with this 96659D653BDE?????????? and remove the old 96659D653BDE??????????.zip file which is uncompleted. So in the end your r28.zip is now the zip visual studio tryed to download.

    Then go to visual studio and rebuild your project wait and Viola you got rebuild success. Good Luck

    Here the link to my original Thread:
    https://forums.xamarin.com/discussion/69421/big-problems-and-how-to-slove-them-cant-find-resources-package-android-m2repository-r28-zip#latest

    Cheers!
    Let me know if it worked.

  • MaciekAciekMaciekAciek USMember

    @lukasrein97 said:

    Error download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the PATH\Xamarin.Android.Support.v4\23.0.1.3 directory.

    This is a popular issue. I already created a thread how to reslove that. It means that you have installed the component but it couldnt download the nessasary resources for some reason nobody knows.

    Here some snippets of my Thread:
    Sloution1 :

    You should: 1-Download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip 2-Go to: (In my Case the followin Link but you should see your direction in the errorlog after you try to build your Application) /Users/AppData/Xamarin/Android.Support.Design/23.2.1.0/content 3-unzip the downloaded zipfile here in this direction.

    If this doesnt work then here is Solution2:

    Download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
    Then go [username]\AppData(hidder folder)\Local\Xamarin\zip
    and delete any zip file from there. then rebuild you project and go back to Xamarin\zip and now you should found there something like 96659D653BDE??????????.zip file which visual studio try to download. stop the build now and copy the downloaded r28.zip in this direction and rename that file with this 96659D653BDE?????????? and remove the old 96659D653BDE??????????.zip file which is uncompleted. So in the end your r28.zip is now the zip visual studio tryed to download.

    Then go to visual studio and rebuild your project wait and Viola you got rebuild success. Good Luck

    Here the link to my original Thread:
    https://forums.xamarin.com/discussion/69421/big-problems-and-how-to-slove-them-cant-find-resources-package-android-m2repository-r28-zip#latest

    Cheers!
    Let me know if it worked.

    Hello.

    I tried your solutions, but unfortunately - they doesn't work :neutral:.

    Firstly, I unpacked zip (https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip), in the indicated directory (C:\Users_MyAccount_\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.0.1.3\content)

    Secondly, I deleted all the zip's stored in the folder C:\Users_MyAccount_\AppData\Local\Xamarin\zips
    I tried to rebuild solution, but it obviously failed. Then I was looking for files similar to this one 96659D653BDE??????????.zip. However I haven't found any of these. Of course I have turned on the visibility of hidden / system files.

    On the other hand, a different error is now visible:
    Reason: The remote server returned an error: (407) Proxy Authentication Required.

    Where can I specify PROXY address, credentials, etc.?

Sign In or Register to comment.