android - cmd 给出 com.android.ide.common.process.ProcessException: 无法执行 aapt erro
问题描述
我想react-native-fcm
用于 google firebase 推送通知,但是当我运行react-native run-android
它时,它给了我这个错误 com.android.ide.common.process.ProcessException: Failed to execute aapt
我的反应原生版本:“react-native”:“0.55.4”fcm 版本:“react-native-fcm”:“^15.0.2”
安卓 => bulde.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
android/app=>buld.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
设置.gradle
rootProject.name = 'Notif'
include ':react-native-fcm'
project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android')
include ':app'
我已经在 android/app 文件夹中链接了 google-services.json
问题出在哪里,我该如何解决?
解决方案
推荐阅读
- python - 将 2d numpy 数组分配给 pandas DataFrame 时的意外行为
- laravel - 如何在laravel上获取差异函数的路由参数?
- apache - 我应该使用 nginx+uwsgi 还是 apache+modwsgi?
- swift - 在 CKRecord 扩展中编码订阅的更好方法?
- google-app-engine - 是否可以跟踪这些点击的来源?
- ios - Mapbox iOS 按属性或功能搜索
- reactjs - React - ComponentDidMount 没有从 Redux 状态中获取价值
- scala - 使用来自 scala 的 Calcite 的 ReflectiveSchema
- ios - locationManager.location 始终为零
- chisel - 如何将 sbus 主机添加到火箭芯片外围设备