React Native发布于app:mergeReleaseResources

问题描述 投票:1回答:1

我正在尝试为反应原生应用程序构建发布apk。我已经创建了密钥库,并且还按照文档中的建议在build.gradle文件中添加了信息。

但它被卡在app:mergeReleaseResources 30-40分钟没有结果。我尝试过不同的应用程序,过去曾经构建过的应用程序,但它现在还没有运行。我甚至尝试重新安装Android Studio和SDK但它仍然卡住了。

请帮忙。

这是日志 -

```

gradlew.bat assembleRelease
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (25.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.3.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
downloadRobolectricDependencies F:\Projects\react-native\Zest\android\build/robolectric-dependencies
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.3.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.3.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.3.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
:app:preBuild UP-TO-DATE
:react-native-navigation:preBuild UP-TO-DATE
:react-native-navigation:preReleaseBuild UP-TO-DATE
:react-native-navigation:checkReleaseManifest
:react-native-navigation:processReleaseManifest
:react-native-splash-screen:preBuild UP-TO-DATE
:react-native-splash-screen:preReleaseBuild UP-TO-DATE
:react-native-splash-screen:checkReleaseManifest
:react-native-splash-screen:processReleaseManifest
:react-native-vector-icons:preBuild UP-TO-DATE
:react-native-vector-icons:preReleaseBuild UP-TO-DATE
:react-native-vector-icons:checkReleaseManifest
:react-native-vector-icons:processReleaseManifest
:app:preReleaseBuild
:react-native-navigation:compileReleaseAidl
:react-native-splash-screen:compileReleaseAidl
:react-native-vector-icons:compileReleaseAidl
:app:compileReleaseAidl
:react-native-navigation:packageReleaseRenderscript NO-SOURCE
:react-native-splash-screen:packageReleaseRenderscript NO-SOURCE
:react-native-vector-icons:packageReleaseRenderscript NO-SOURCE
:app:compileReleaseRenderscript
:app:checkReleaseManifest
:app:generateReleaseBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:mergeReleaseShaders
:app:compileReleaseShaders
:app:generateReleaseAssets
:react-native-navigation:mergeReleaseShaders
:react-native-navigation:compileReleaseShaders
:react-native-navigation:generateReleaseAssets
:react-native-navigation:packageReleaseAssets
:react-native-splash-screen:mergeReleaseShaders
:react-native-splash-screen:compileReleaseShaders
:react-native-splash-screen:generateReleaseAssets
:react-native-splash-screen:packageReleaseAssets
:react-native-vector-icons:mergeReleaseShaders
:react-native-vector-icons:compileReleaseShaders
:react-native-vector-icons:generateReleaseAssets
:react-native-vector-icons:packageReleaseAssets
:app:mergeReleaseAssets
:app:generateReleaseResValues
:app:generateReleaseResources
:react-native-navigation:compileReleaseRenderscript
:react-native-navigation:generateReleaseResValues
:react-native-navigation:generateReleaseResources
:react-native-navigation:packageReleaseResources
:react-native-splash-screen:compileReleaseRenderscript
:react-native-splash-screen:generateReleaseResValues
:react-native-splash-screen:generateReleaseResources
:react-native-splash-screen:packageReleaseResources
:react-native-vector-icons:compileReleaseRenderscript
:react-native-vector-icons:generateReleaseResValues
:react-native-vector-icons:generateReleaseResources
:react-native-vector-icons:packageReleaseResources
:app:mergeReleaseResources
android android-studio react-native apk
1个回答
4
投票
android {
// ...
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
// ...
}

尝试在您的应用模块build.gradle:上使用此代码

© www.soinside.com 2019 - 2024. All rights reserved.