gpt4 book ai didi

android - React Native - 在包 'appComponentFactory' 中找不到属性 'android' 的资源标识符

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:17:18 25 4
gpt4 key购买 nike

我遇到了一个问题,每当我尝试使用 react-native run-android 进行构建时,构建都会失败并出现以下错误。

\?\E:\projects\deets-mobile-cp\android\app\build\intermediates\manifests\full\release\AndroidManifest.xml:88: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processReleaseResources'.

    Failed to process resources, see aapt output above for details.

我已经研究了这个错误,但未能解决它。出了什么问题我想不通。我正在使用 gradle v3.1.2

有没有人知道出了什么问题

React Nativev0.53.3

android/app.js

dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-image-picker')
compile project(':react-native-facebook-login')
compile project(':instabug-reactnative')
compile fileTree(dir: "libs", include: ["*.jar"])
compile ("com.android.support:appcompat-v7:24.2.0") {
exclude module: 'support-v4'
}
compile "com.facebook.react:react-native:+" // From node_modules
compile ("com.facebook.react:react-native:0.53.3") {
force=true
} // From node_modules
compile project(':react-native-picker')
compile project(':react-native-braintree-xplat')
compile project(':react-native-linear-gradient')
compile project(':mapbox-react-native-mapbox-gl')
compile ('com.android.support:multidex:1.0.0')
compile "com.android.support:support-v13:24.2.1"
compile project(':react-native-fcm')
compile 'com.google.firebase:firebase-core:11.8.0' //this decides your firebase SDK version
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile ("com.google.android.gms:play-services-base:11.8.0") {
force = true;
}
compile ("com.google.android.gms:play-services-maps:11.8.0") {
force = true;
}
compile project(':react-native-splash-screen')
compile project(':rn-fetch-blob')
compile project(':react-native-background-timer')
compile(project(':react-native-google-signin')){
exclude group: "com.google.android.gms"
}
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile(project(':react-native-geolocation-service')) {
exclude group: 'com.google.android.gms', module: 'play-services-location'
}
compile 'com.google.android.gms:play-services-location:11.8.0'
compile project(':react-native-twilio-video-webrtc')
}

gradlew assembleRelease --stacktrace

  • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processReleaseResources'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: org.gradle.tooling.BuildException: Failed to process resources, see aapt output above for details. at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:512) at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.doFullTaskAction(LinkApplicationAndroidResourcesTask.java:249) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)

最佳答案

我有同样的问题,看看你的依赖关系,我们都在使用 react-native-braintree-xplat。

Braintree 最近更新了库以支持 Android 28,问题就出在这里。

我不是 android 专家,但你应该强制com.braintreepayments.api 到版本 2.17.0

我在我的项目 build.gradle 中使用

allprojects {
repositories {
......
configurations.all {
resolutionStrategy {
force 'com.braintreepayments.api:braintree:2.17.0'
}
}
......
}

关于android - React Native - 在包 'appComponentFactory' 中找不到属性 'android' 的资源标识符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53114324/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com