Issues installing NuGet package v2.2.1 for Android

Hi, 

I'm having issue installing UrbanAirship SDK NuGet package v2.2.1 for Android. The Package Manager reported error says: "ZIP archive contains unsupported data structures."

My setup is:

Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3

NuGet Package Manager 3.4.4 NuGet Package Manager in Visual Studio.

Xamarin 4.2.0.688 (94c1c37) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 7.0.1.0 (6165b56) Visual Studio extension to enable development for Xamarin.Android. 

 

I would be happy to upgrade to v2.2.2 but since the project depends on Xamarin package which depends on Android.Support.v4 v23.3.0 it's impossible. 

Please advice. 

Thanks

Daniel

Didn't find what you were looking for?

New post

Comments

9 comments

  • Hi Daniel,

    Would you be able to send us the full logs you have from Visual Studio that shows that error? We can take that and investigate further to see if we can find a solution for you.

    Comment actions Permalink
    0
  • I'm having the same issue as Daniel. Is there a solution for this? Here are my logs...

     

    Attempting to gather dependency information for package 'urbanairship.2.2.1' with respect to project 'CrossCam.Droid', targeting 'MonoAndroid,Version=v7.0'
    Attempting to resolve dependencies for package 'urbanairship.2.2.1' with DependencyBehavior 'Lowest'
    Resolving actions to install package 'urbanairship.2.2.1'
    Resolved actions to install package 'urbanairship.2.2.1'
    Package 'Xamarin.Android.Support.v4.23.3.0' already exists in folder ''
    Added package 'Xamarin.Android.Support.v4.23.3.0' to 'packages.config'
    Successfully installed 'Xamarin.Android.Support.v4 23.3.0' to CrossCam.Droid
    Package 'Xamarin.Android.Support.v7.CardView.23.3.0' already exists in folder ''
    Added package 'Xamarin.Android.Support.v7.CardView.23.3.0' to 'packages.config'
    Successfully installed 'Xamarin.Android.Support.v7.CardView 23.3.0' to CrossCam.Droid
    Package 'Xamarin.GooglePlayServices.Basement.29.0.0.1' already exists in folder ''
    Added package 'Xamarin.GooglePlayServices.Basement.29.0.0.1' to 'packages.config'
    Successfully installed 'Xamarin.GooglePlayServices.Basement 29.0.0.1' to CrossCam.Droid
    Package 'Xamarin.GooglePlayServices.Base.29.0.0.1' already exists in folder ''
    Added package 'Xamarin.GooglePlayServices.Base.29.0.0.1' to 'packages.config'
    Successfully installed 'Xamarin.GooglePlayServices.Base 29.0.0.1' to CrossCam.Droid
    Package 'Xamarin.GooglePlayServices.Measurement.29.0.0.1' already exists in folder ''
    Added package 'Xamarin.GooglePlayServices.Measurement.29.0.0.1' to 'packages.config'
    Successfully installed 'Xamarin.GooglePlayServices.Measurement 29.0.0.1' to CrossCam.Droid
    Package 'Xamarin.GooglePlayServices.Gcm.29.0.0.1' already exists in folder ''
    Added package 'Xamarin.GooglePlayServices.Gcm.29.0.0.1' to 'packages.config'
    Successfully installed 'Xamarin.GooglePlayServices.Gcm 29.0.0.1' to CrossCam.Droid
    Adding package 'urbanairship.2.2.1' to folder ''
    Added package 'urbanairship.2.2.1' to folder ''
    Added package 'urbanairship.2.2.1' to 'packages.config'
    Successfully installed 'urbanairship 2.2.1' to CrossCam.Droid
    ========== Finished ==========
    ZIP archive contains unsupported data structures.

    Comment actions Permalink
    0
  • Hi ,

    What version of Visual Studio are you running? Additionally, are you running the latest Xamarin and Nuget and downloaded the latest Urban Airship component(3.1.1)?

    Comment actions Permalink
    0
  • Visual Studio version is 14.0.25431.01 Update 3

    I am running the latest Xamarin version 4.2.1.64

     

    I can't download the latest UrbanAirship package because this is a Xamarin Forms application. The Xamarin Forms package has a dependency on Xamarin.Android.Support.v4 of 23.3.0. I have to go back to the UrbanAirship package 2.2.1 to be compatible with the Xamarin Forms limitation.

    Comment actions Permalink
    0
  • Xamarin forms shouldn't have anything to do with it not working. Does it work on a non-Xamarin Forms app?

    I'm able to add the SDK without using the Nuget Package Manager, so it could perhaps be a problem with Nuget.

    Comment actions Permalink
    0
  • Here is my package list. With this package list and before I add the urbanairship 2.2.1 dll the application runs perfectly.

    <packages>
      <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Forms" version="2.3.3.175" targetFramework="monoandroid60" />
      <package id="Xamarin.GooglePlayServices.Base" version="29.0.0.2" targetFramework="monoandroid60" />
      <package id="Xamarin.GooglePlayServices.Basement" version="29.0.0.2" targetFramework="monoandroid60" />
      <package id="Xamarin.GooglePlayServices.Gcm" version="29.0.0.2" targetFramework="monoandroid60" />
      <package id="Xamarin.GooglePlayServices.Measurement" version="29.0.0.2" targetFramework="monoandroid60" />
    </packages>

    I then add a reference to the urbanairship.dll for the 2.2.1 SDK (Not using the NuGet)

    urbanairship-2.2.1\lib\android/AirshipBindings.dll

    The app still builds without error, but now when I go to run the app won't launch on the device. The output debug window gives me this message:

    Android application is debugging.
    The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
    Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.
     
    The output build window gives me this:
     
    1>Unexpected install output:  pkg: /data/local/tmp/CrossApp.Droid-Signed.apk
    1>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
    1>
    1>Build succeeded.
    1>Deploy successfully on Samsung SM-N920V.
    ========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
     
    With the urbanairship dll removed the output build window looks like this:
     
    1>C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.1\zipalign.exe 4 "C:\Projects\XamarinPrototypes\CrossApp\CrossApp\CrossApp.Droid\bin\Debug\CrossApp.Droid-Signed-Unaligned.apk" "bin\Debug\\CrossApp.Droid-Signed.apk"
    1>Build succeeded.
    1>Deploy successfully on Samsung SM-N920V.
    ========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
     
     
    Am I missing something simple such as another dependency? My Xamarin.Android.Support.v7.CardView and Xanamrin.Android.Support.v4 are both limited to version 23.3.0 because of the Xamarin Forms dependency. I have tried this on a non Xamarin Forms app and it does work, but I can also use the latest urbanairship sdk there. Thanks for your help.
     
     
    Comment actions Permalink
    0
  • After you've added the .dll to the Xamarin Forms app, are you also ensuring that the AirshipConfig.properties file is properly filled in with the appropriate info?

    What does the AndroidManifest.xml file look like after you've added the .dll for Urban Airship?

    Comment actions Permalink
    0
  • Thanks for your help. It's working now, but I'm not sure why. I filled in a package name in the manifest, ran it and it worked. I tried it again with the package name empty and it still worked. I guess it just needed a little help finding its way. I haven't got to the point where I have tested notifications yet though. I've just been trying to get the app to run with the urbanairship reference. Thanks again for your assistance.

    Comment actions Permalink
    0
  • No problem! Let us know if you run into any other issues.

    Comment actions Permalink
    0

Please sign in to leave a comment.