小编Key*_*yul的帖子

Angular Universal TTFB 非常慢

当我使用 Angular Universal 运行应用程序时,我发现 TTFB 存在巨大差异。ssr 比正常的角度命令花费更多时间。如何使用 Angular 通用服务器端渲染改进 TTFB?

npm run serve:ssr
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

性能选项卡: 在此输入图像描述

ng serve
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

查了很多网站,但到目前为止还没有在互联网上找到任何相关的解决方案。

angular-universal angular angular-devkit

8
推荐指数
1
解决办法
7493
查看次数

Facebook Audience Network Ad Sdk依赖项在Android App中显示运行时错误

在build.gradle中添加以下依赖项

compile 'com.facebook.android:audience-network-sdk:4.+'
Run Code Online (Sandbox Code Playgroud)

运行项目给出了错误

错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败.com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/google/android/gms/internal/zzf.class

App,build.gradle文件

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.xyz.abc"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
   multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

packagingOptions {
    pickFirst 'META-INF/maven/com.squareup.picasso/picasso/pom.properties'
    pickFirst 'META-INF/maven/com.squareup.picasso/picasso/pom.xml'
}

}

repositories {
   mavenCentral()
}

dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.0.+'
compile 'com.android.support:recyclerview-v7:23.0.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-messaging:9.0.2'
compile 'com.facebook.android:audience-network-sdk:4.+'
compile 'com.squareup.picasso:picasso:2.5.2'
}

apply plugin: …
Run Code Online (Sandbox Code Playgroud)

java android facebook-android-sdk build.gradle android-gradle-plugin

5
推荐指数
2
解决办法
1163
查看次数