小编Dan*_*Dan的帖子

什么是platformAttrExtractor gradle任务,为什么它很慢?

我有一个构建过程很长的android解决方案。我做了一个gradle配置文件,发现执行“ platformAttrExtractor”任务花费的时间过长(超过6分钟),我想知道该任务是什么,因为我无法在线找到有关该任务的信息,以及如何减少它的信息。运行。

android gradle android-studio

5
推荐指数
0
解决办法
264
查看次数

WPF 应用程序,在打开窗口之前运行异步任务

我遇到了一个问题,我需要在主窗口打开和显示之前运行异步任务。IE

[STAThread]
static void Main(string[] args)
     MainWindow window = new MainWindow();

     SplashScreen.Show("Authenticating");
     await Authenticate();  // Need something similar to this....
     SplashScreen.Close();

     new Application().Run(window);
}

static async Task Authenticate()
{
     // Load Local Auth Data
     var result = await Authenticator.Authenticate(); // Validates google token with webservice
     if (result.GoogleReauthRequired)
     {
         if (MessageBox.Show(......) == MessageBoxResult.Yes)
         {
              Google.Reauthenticate();// Opens web browser for account to be logged into using OAuth
              result = await Authenticator.Authenticate();
         }
     }
     // Initialize state
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,由于启动 Main 函数不是异步的(也不能因为它是 STAThread)。我不能像上图那样简单地做到这一点。

我尝试了其他几种方法,例如: …

c# wpf async-await

2
推荐指数
1
解决办法
3370
查看次数

标签 统计

android ×1

android-studio ×1

async-await ×1

c# ×1

gradle ×1

wpf ×1