<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't load MMPK file, using .NET MAUI, Android and the ESRI Tutorial in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1306514#M11969</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/696929"&gt;@mprogers&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You may want to check if the application can detect your file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use something like this to check if the file exists:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var mmpkLocation = System.IO.Path.Combine(Environment.CurrentDirectory, @"data/MahouRivieraTrails.mmpk");
MMPKExists = File.Exists(mmpkLocation);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that in my case, the file is located within the data directory. Also, in your post, you said this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The instructions are to just drag the mmpk file into the project, and set Build Action to Compile, I've done that.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I don't think there's a build action called "Compile". Do you mean Content? You can also check the .sln file in Visual Studio's Solution Explorer to see if the mmpk is added there. Double click on the project in Solution Explorer, and you'll see the .sln file open. Search for instances of "mmpk". You should see something like this.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&amp;lt;ItemGroup&amp;gt;
&amp;lt;Content Include="data\MahouRivieraTrails.mmpk" /&amp;gt;
&amp;lt;/ItemGroup&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2023 13:45:22 GMT</pubDate>
    <dc:creator>KevinCheriyan</dc:creator>
    <dc:date>2023-07-07T13:45:22Z</dc:date>
    <item>
      <title>Can't load MMPK file, using .NET MAUI, Android and the ESRI Tutorial</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1305448#M11962</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;I'm following &lt;A href="https://developers.arcgis.com/net/offline-maps-scenes-and-data/tutorials/display-a-map-from-a-mobile-map-package/" target="_blank" rel="noopener nofollow ugc"&gt;the ESRI tutoria&lt;/A&gt;l on how to display a MMPK file. I've got the program running on a physical device, and it brings up a mapview, but there's nothing in it. The code itself is quite short:&lt;/P&gt;&lt;P class=""&gt;string pathToMobileMapPackage = System.IO.Path.Combine(Environment.CurrentDirectory, @"MahouRivieraTrails.mmpk");MobileMapPackage mahouRivieraTrails_MobileMapPackage = new MobileMapPackage(pathToMobileMapPackage);await mahouRivieraTrails_MobileMapPackage.LoadAsync();this.Map = mahouRivieraTrails_MobileMapPackage.Maps.FirstOrDefault();&lt;/P&gt;&lt;P class=""&gt;​ But when I run it I get this error:&lt;/P&gt;&lt;P class=""&gt;Thread started: #5&lt;BR /&gt;[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.Specialized.dll&lt;/P&gt;&lt;P class=""&gt;Loaded assembly:/data/data/com.companyname.displayamap/files/.__override__/System.Collections.Specialized.dll [External]&lt;/P&gt;&lt;P class=""&gt;ArcGIS Maps SDK: Load Error: MobileMapPackage&lt;BR /&gt;System.IO.FileNotFoundException&lt;BR /&gt;File not found: /MahouRivieraTrails.mmpk&lt;/P&gt;&lt;P class=""&gt;The instructions are to just drag the mmpk file into the project, and set Build Action to Compile, I've done that.&lt;/P&gt;&lt;P class=""&gt;I do see the file listed in a file, PublishOutputs.txt, which I presume lists what gets output to the APK.&lt;/P&gt;&lt;P class=""&gt;But, I unzipped the APK file and there is no file with a .mmpk in its name.&lt;/P&gt;&lt;P class=""&gt;I do see a message in the log, @(Content) build action is not supported (XA0101)&lt;/P&gt;&lt;P class=""&gt;Any ideas what I'm doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks so much for any info...&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;0 Comments&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Share&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Save&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 22:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1305448#M11962</guid>
      <dc:creator>mprogers</dc:creator>
      <dc:date>2023-07-03T22:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can't load MMPK file, using .NET MAUI, Android and the ESRI Tutorial</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1305609#M11964</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Update to the above:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now I'm more convinced (about 50% sure) that it's an ESRI problem: I can see the .mmpk file in the Assets folder on the .apk file, i.e., it is being copied (right next to Assets.txt, I made that Always Copy just to be able to check). Now Assets.txt has a path of /Assets.txt, so it follows that MahouRivieraTrails.mmpk ought to have a path of /MahouRivieraTrails.mmpk, and it does. But when I run this code:&lt;/P&gt;&lt;P&gt;// Define the path to the mobile map package.&lt;/P&gt;&lt;P&gt;string pathToMobileMapPackage = Path.Combine(Environment.CurrentDirectory, "MahouRivieraTrails.mmpk");&lt;/P&gt;&lt;P&gt;MobileMapPackage mahouRivieraTrails_MobileMapPackage = new MobileMapPackage(pathToMobileMapPackage);&lt;/P&gt;&lt;P&gt;// Load the mobile map package.&lt;BR /&gt;await mahouRivieraTrails_MobileMapPackage.LoadAsync();&lt;/P&gt;&lt;P&gt;// Show the first map in the mobile map package.&lt;BR /&gt;this.Map = mahouRivieraTrails_MobileMapPackage.Maps.FirstOrDefault();&lt;/P&gt;&lt;P&gt;it throws an exception on the LoadAsync() line, the error being:&lt;/P&gt;&lt;P&gt;System.IO.FileNotFoundException: File not found: /MahouRivieraTrails.mmpk&lt;/P&gt;&lt;P&gt;I'm desperate, and going to file a bug report, but if anybody has any suggestions (apart from give up and go back to Swift), I'd really, really like to hear from you!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 19:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1305609#M11964</guid>
      <dc:creator>mprogers</dc:creator>
      <dc:date>2023-07-04T19:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can't load MMPK file, using .NET MAUI, Android and the ESRI Tutorial</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1306514#M11969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/696929"&gt;@mprogers&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You may want to check if the application can detect your file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use something like this to check if the file exists:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var mmpkLocation = System.IO.Path.Combine(Environment.CurrentDirectory, @"data/MahouRivieraTrails.mmpk");
MMPKExists = File.Exists(mmpkLocation);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that in my case, the file is located within the data directory. Also, in your post, you said this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The instructions are to just drag the mmpk file into the project, and set Build Action to Compile, I've done that.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I don't think there's a build action called "Compile". Do you mean Content? You can also check the .sln file in Visual Studio's Solution Explorer to see if the mmpk is added there. Double click on the project in Solution Explorer, and you'll see the .sln file open. Search for instances of "mmpk". You should see something like this.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&amp;lt;ItemGroup&amp;gt;
&amp;lt;Content Include="data\MahouRivieraTrails.mmpk" /&amp;gt;
&amp;lt;/ItemGroup&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 13:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1306514#M11969</guid>
      <dc:creator>KevinCheriyan</dc:creator>
      <dc:date>2023-07-07T13:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can't load MMPK file, using .NET MAUI, Android and the ESRI Tutorial</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1340585#M12203</link>
      <description>&lt;P&gt;Are there any updates on this issue? I'm having the same problem on Android and would appreciate any help with it.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 17:22:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-t-load-mmpk-file-using-net-maui-android-and/m-p/1340585#M12203</guid>
      <dc:creator>FabricioBezerra</dc:creator>
      <dc:date>2023-10-23T17:22:30Z</dc:date>
    </item>
  </channel>
</rss>

