在这篇文章中,我们将为您详细介绍React-native>Task:app:generatePackageListFAILED的内容。此外,我们还会涉及一些关于(React-Native)任务:app
在这篇文章中,我们将为您详细介绍React-native > Task :app:generatePackageList FAILED的内容。此外,我们还会涉及一些关于(React-Native) 任务 :app:generatePackageList FAILED、> 任务 :react-native-community_async-storage:checkDebugManifest FAILED in react native、Android-Studio Execution failed for task '':app:pro、Android_bug 之 task '':app:mergeDebugResources''. > Some file crunching failed, see logs f的知识,以帮助您更全面地了解这个主题。
本文目录一览:- React-native > Task :app:generatePackageList FAILED
- (React-Native) 任务 :app:generatePackageList FAILED
- > 任务 :react-native-community_async-storage:checkDebugManifest FAILED in react native
- Android-Studio Execution failed for task '':app:pro
- Android_bug 之 task '':app:mergeDebugResources''. > Some file crunching failed, see logs f
React-native > Task :app:generatePackageList FAILED
如何解决React-native > Task :app:generatePackageList FAILED
我一直在使用 IOS 模拟器开发 RN 应用程序,现在我第一次尝试在 android 模拟器中构建应用程序,但出现此错误
我有安卓开发环境
任何线索是什么问题或可能的解决方案?
(React-Native) 任务 :app:generatePackageList FAILED
如何解决(React-Native) 任务 :app:generatePackageList FAILED
我想部署一个生成 APK 文件的 react-native 项目,但是当我在 android 文件夹中使用 ./gradlew assembleRelease
时,控制台显示:
任务 :app:generatePackageList 失败
FAILURE:构建失败,出现异常。
- 哪里: 脚本 ''.\\ReactNativeProject\\ETS_Finder\\node_modules@react-native-community\\cli-platform-android\\native_modules.gradle'' 行:131
- 出了什么问题: 任务“:app:generatePackageList”执行失败。
java.lang.IllegalArgumentException(无错误信息)`
我已经按照 React-Native 文档的建议为应用创建了一个密钥并修改了 build.gradle 文件。
我也尝试使用 Android Studio 构建相同的应用程序,但构建输出显示:Build Failed : Cause: argument type mismatch
编辑 1 我的 build.gradle :
project.ext.react = [
enableHermes: false,// clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the cpu architecture of their device.
*/
def enableSeparateBuildPercpuArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
*
* For example,to use the international variant,you can use:
* `def jscFlavor = ''org.webkit:android-jsc-intl:+''`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = ''org.webkit:android-jsc:+''
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react,JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes",false);
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.ets_finder"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
signingConfigs {
release {
storeFile file(''your_key_name.keystore'')
storePassword ''your_key_store_password''
keyAlias ''your_key_alias''
keyPassword ''your_key_file_alias_password''
}
}
splits {
abi {
reset()
enable enableSeparateBuildPercpuArchitecture
universalApk false // If true,also generate a universal APK
include "armeabi-v7a","x86","arm64-v8a","x86_64"
}
}
signingConfigs {
debug {
storeFile file(''debug.keystore'')
storePassword ''android''
keyAlias ''androiddebugkey''
keyPassword ''android''
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production,you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"),"proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug,release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture,set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a,1002 for x86,etc.
def versionCodes = ["armeabi-v7a": 1,"x86": 2,"arm64-v8a": 3,"x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug,universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
}
}
dependencies {
implementation filetree(dir: "libs",include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:''com.facebook.fbjni''
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:''com.facebook.flipper''
exclude group:''com.squareup.okhttp3'',module:''okhttp''
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:''com.facebook.flipper''
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: copy) {
from configurations.compile
into ''libs''
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
本机反应:"version": "0.64.2"
解决方法
我在这篇文章中找到了解决方案:
https://stackoverflow.com/questions/67093053/react-native-execution-failed-for-task-appgeneratepackagelist
它说 react-native-cli 不支持 Gradle ver 7.0,所以需要将 Gradle 降级到以前的版本(例如我使用 Gradle ver. 6.6)
,我遇到了同样的错误,降级到 Gradle 6.9 工作正常!
> 任务 :react-native-community_async-storage:checkDebugManifest FAILED in react native
如何解决> 任务 :react-native-community_async-storage:checkDebugManifest FAILED in react native
我在构建 React Native 应用程序时遇到错误。
错误:> Task :react-native-community_async-storage:checkDebugManifest Failed
2 actionable tasks: 2 executed
FAILURE: Build Failed with an exception.
* What went wrong:
Execution Failed for task '':react-native-community_async-storage:checkDebugManifest''.
> Couldn''t delete stale output file
我将 gradle 6.3
更改为 6.5
,我认为这可以解决问题,但事实并非如此。我不知道如何修复这个错误。
Android-Studio Execution failed for task '':app:pro
(适合于1.0版本)当出现图中右下角的问题时,可以按照文章的提示进行修改,就能正常运行了。
第一步打开build.gradle(Module.app)文件。
第二步找到图中2表示的代码,然后删除。
第三步保存即可。
Android_bug 之 task '':app:mergeDebugResources''. > Some file crunching failed, see logs f
错误代码
Error:Execution failed for task '':PulltorefreshLibrary:mergeDebugAndroidTestResources''.
> Some file crunching failed, see logs for details
AAPT err(Facade for 598446055) : No Delegate set : lost message:libpng error: CgBI: unhandled critical chunk
Gradle: Execution failed for task '':processDebugManifest''
错误原因
PulltorefreshLibrary res 下的图片有问题
1. 图片损坏打不开或格式错误直接把.jpg 重命名.png 文件 只改变了扩展名而格式没有得到改变 需要用转换软件进行转换
2. 据说图片经过 xcode4 压缩后会出现该情况 如果情况属实 经过其他压缩软件压缩后是否会出现该问题 (没经过证实)
关于React-native > Task :app:generatePackageList FAILED的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于(React-Native) 任务 :app:generatePackageList FAILED、> 任务 :react-native-community_async-storage:checkDebugManifest FAILED in react native、Android-Studio Execution failed for task '':app:pro、Android_bug 之 task '':app:mergeDebugResources''. > Some file crunching failed, see logs f的相关知识,请在本站寻找。
本文标签: