[UWP] Generated Release App在移动设备上上传捆绑包崩溃 [英] [UWP]Generated Release App Upload bundle crash on Mobile

查看:97
本文介绍了[UWP] Generated Release App在移动设备上上传捆绑包崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我一直在处理已生成的应用包的问题,​​该应用包已上传到应用商店。这个应用程序是一个在桌面和移动设备上运行的UWP应用程序。

I've been running into issues with the generated app bundle that gets uploaded to the app store. This app is a UWP app that runs on both desktop and mobile devices.

在我为商店创建应用程序包之后,我将应用程序加载到我的Lumia 950上以测试它和它发射时崩溃,我无法弄清问题是什么。我剥离了"App"。所以它只是裸骨,但它仍然会在发布时崩溃
。但是,当我尝试侧面加载在"_Test"下生成的包时。文件夹,应用程序不会崩溃。

After I create the app packages for the store, I side load the app onto my Lumia 950 to test it and it crashes on launch and I am unable to figure out what the problem is. I stripped the "App" class so it is just bare bones but it still crashes on launch. But when I try to side load the bundle that is generated under the "_Test" folder, the app DOES NOT crash.

我在这里上传了ARM版本:  https://1drv.ms/f/s!Anec4-FVkNsbhdtRpU3k1bKrevX2Ig

I uploaded the ARM builds here: https://1drv.ms/f/s!Anec4-FVkNsbhdtRpU3k1bKrevX2Ig

以下是起始"应用程序"的代码。类。它只实例化一个"BlankPage1"。完全空白的类。

Below is the code from the starting "App" class. It only instantiates a "BlankPage1" class that is completely blank.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.ApplicationModel.Background;
using System.Threading.Tasks;
using RuntimeComponent1;
using CoreUtils;
using Windows.UI.ViewManagement;
using Windows.ApplicationModel.Resources;
using Windows.ApplicationModel.DataTransfer;
using Windows.ApplicationModel.DataTransfer.ShareTarget;
using System.Diagnostics;

using Windows.UI.Notifications;
using Windows.Data.Xml.Dom;
using Windows.Networking.PushNotifications;
using Windows.Foundation.Metadata;
using Windows.System.RemoteSystems;
using NotificationsExtensions.Toasts;
using Windows.UI.Core;
using Microsoft.QueryStringDotNET;
using Windows.Globalization;
using Windows.UI.Xaml.Media.Animation;
using Windows.ApplicationModel.Core;
using Microsoft.HockeyApp;
using Windows.ApplicationModel.AppService;

namespace CopyPaste
{
    /// <summary>
    /// Provides application-specific behavior to supplement the default Application class.
    /// </summary>
    sealed partial class App : Application
    {
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        /// 
        private MainPage existingMainPage;
        public static AppServiceConnection connection = null;
        BackgroundTaskDeferral appServiceDeferral = null;
        private bool goToAccounts = false;

        public App()
        {
            this.InitializeComponent();
        }

        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            appInit(e);
        }
        

        private void appInit(IActivatedEventArgs e)
        {

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = false;
            }
#endif
            Frame rootFrame = Window.Current.Content as Frame;
            
            if (rootFrame == null)
            {
                
                rootFrame = new Frame();
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(BlankPage1));
            }

            Window.Current.Activate();
        }
        
        
        public static string getString(string key)
        {
            return ResourceLoader.GetForCurrentView().GetString(key);
        }
        
        
        
        public static bool isPipModeAvailable()
        {
            if ( !ApiInformation.IsEnumNamedValuePresent("Windows.UI.ViewManagement.ApplicationViewMode", "CompactOverlay") )
            {
                return false;
            }
            return ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay);
        }

    }
}

我'我现在不知道如何解决这个问题。

I'm at a loss on how to solve this problem now.

快速摘要:

该应用适用于以下情况的移动设备:

The app works on a mobile device when:


  • 在Visual Studio上以调试模式部署
  • 在Visual Studio上以发布模式部署
  • 从生成的方面加载应用程序包" _Test"文件夹

在以下情况下移动设备启动时应用程序崩溃:

The app crashes on launch for mobile devices when:


  • 边加载自动生成的" ; appxupload"捆绑

其他信息:


  • Visual Studio版本15.6.4
  • 此应用是"桌面网桥",但所有这些组件都已在移动设备上停用
  • 应用目标最低版本为14393
  • 应用目标16299
  • "优化代码"和"使用.NET Native工具链编译"已签入发布模式

推荐答案

Hi CMak3,

应用包 以"appxupload"命名用于上传到商店,它不用于侧载。
所以当你使用appxupload bundle时肯定会崩溃。如果你需要侧载,请只使用文件夹中的应用程序包。

The app bundle named with "appxupload" is used to upload to the Store and it is not used to side load. So it will definitely crash when you use appxupload bundle. If you need to side load, please just use the app bundle in the folder.

最好的问候,

Roy


这篇关于[UWP] Generated Release App在移动设备上上传捆绑包崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆