需要一些帮助:任务':app:processDebugResources'的执行失败

时间:2019-06-11 21:52:38

标签: android react-native visual-studio-code

  

Android资源链接失败
  C:\ Users \ Yoan \ firebaseapp \ android \ app \ build \ intermediates \ merged_manifests \ debug \ AndroidManifest.xml:49:   AAPT:错误:resource drawable / ic_stat_ic_notification(又名   找不到com.firebaseapp:drawable / ic_stat_ic_notification。

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
</manifest>

res文件夹: enter image description here

值文件夹:

enter image description here

strings.xml:

enter image description here

colors.xml:

enter image description here

styles.xml:

enter image description here

我读了几个问题,如果我两次在.xml文件中有第一行,我必须删除其中一行,但是我该怎么办?我只有一次。

3 个答案:

答案 0 :(得分:0)

对该错误消息的快速Google搜索使我转到了另一篇SO帖子:AAPT error: resource drawable/... not found,它似乎在注释中提到了导致此错误的其他一些潜在原因。

尤其是,some talk about line ending mismatches可能适用于您的情况?其他潜在问题包括not having the correct API version setmissing files from your project

鉴于您的错误中特别提到了 var scene; var camera; var renderer; var cube; var cylinder; var red = 1; //Create the scene to draw scene = new THREE.Scene(); scene.background = new THREE.Color( 0xf0f0f0 ); //Create orthographic camera and add it to scene camera = new THREE.OrthographicCamera( window.innerWidth/-200, window.innerWidth/200, window.innerHeight/200, window.innerHeight/-200, 0.1, 1000 ); scene.add( camera ); //Create a renderer for the scene renderer = new THREE.WebGLRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); cube = new THREE.BoxBufferGeometry( 1, 1, 1 ); cylinder = new THREE.CylinderGeometry( 0.1, 0.1, 5, 100 ); var carga = new THREE.Mesh( cube, new THREE.MeshLambertMaterial( { color:0xA6A6A6 } ) ); var cabina = new THREE.Mesh( cube, new THREE.MeshLambertMaterial( { color:0xF2F2F2 } ) ); var luna = new THREE.Mesh( cube, new THREE.MeshLambertMaterial( { color:0xf0f0f0 } ) ); var ventanilla = new THREE.Mesh( cube, new THREE.MeshLambertMaterial( { color:0xF6F6F6 } ) ); var poste = new THREE.Mesh( cube, new THREE.MeshLambertMaterial( { color:0x000000 } ) ); var semaforo = new THREE.Mesh( cube, new THREE.MeshLambertMaterial( { color:0x000000 } ) ); var wheel1 = new THREE.Mesh( cylinder, new THREE.MeshLambertMaterial( { color:0x000000 } ) ); var wheel2 = new THREE.Mesh( cylinder, new THREE.MeshLambertMaterial( { color:0x000000 } ) ); var bombilla = new THREE.Mesh( cylinder, new THREE.MeshLambertMaterial( { color:0xFF0000 } ) ); scene.add( carga ); scene.add(cabina); scene.add(luna); scene.add(ventanilla); scene.add(poste); scene.add(semaforo); scene.add(wheel1); scene.add(wheel2); scene.add(bombilla); var light = new THREE.DirectionalLight( 0xffffff, 1.5 ); light.position.set( 2, 1, 5 ).normalize(); scene.add( light ); var init = function() { //Move the camera to be able to see the object camera.position.z = 3; //Set the truck carga.rotation.y = 1; carga.rotation.x = 0.5; carga.scale.z = 1.5; //Set the cabin cabina.rotation.y = 1; cabina.rotation.x = 0.5; cabina.scale.x = 0.75; cabina.scale.y = 0.8; cabina.scale.z = 0.95; cabina.position.x = 0.7; cabina.position.y = -0.3; cabina.position.z = 0.35; //set the windshield luna.rotation.y = 1; luna.rotation.x = 0.5; luna.scale.x = 0.5; luna.scale.y = 0.3; luna.scale.z = 0.01; luna.position.x = 1.1; luna.position.y = -0.3; luna.position.z = 0.9; //set the window ventanilla.rotation.y = 1; ventanilla.rotation.x = 0.5; ventanilla.scale.x = 0.01; ventanilla.scale.y = 0.3; ventanilla.scale.z = 0.3; ventanilla.position.x = 0.7; ventanilla.position.y = -0.4; ventanilla.position.z = 2; //set the front wheel wheel1.rotation.y = 1; wheel1.rotation.x = 0.5; wheel1.rotation.z = 3.1415/2; wheel1.scale.x = 1; wheel1.scale.y = 0.02; wheel1.scale.z = 1; wheel1.position.x = 0.7; wheel1.position.y = -0.97; wheel1.position.z = 0.5; //set the back wheel wheel2.rotation.y = 1; wheel2.rotation.x = 0.5; wheel2.rotation.z = 3.1415/2; wheel2.scale.x = 1; wheel2.scale.y = 0.02; wheel2.scale.z = 1; wheel2.position.x = -0.5; wheel2.position.y = -0.65; wheel2.position.z = 0.; //set the traffic light stand poste.rotation.y = 1; poste.rotation.x = 0.5; poste.scale.x = 0.2; poste.scale.y = 1.5; poste.scale.z = 0.2; poste.position.x = 2; poste.position.y = 0; poste.position.z = 0; //set the traffic light semaforo.rotation.y = 1; semaforo.rotation.x = 0.5; semaforo.scale.x = 0.2; semaforo.scale.y = 0.7; semaforo.scale.z = 0.5; semaforo.position.x = 2.01; semaforo.position.y = 0.4; semaforo.position.z = 0; //set the light bulb bombilla.rotation.y = 1; bombilla.rotation.x = 0.5; bombilla.rotation.z = 3.1415/2; bombilla.scale.x = 1; bombilla.scale.y = 0.002; bombilla.scale.z = 1; bombilla.position.x = 1.95; bombilla.position.y = 0.35; bombilla.position.z = 0.8; }; var changeColor = function () { if(red == 1) { bombilla.material.color.set(0x0CAB00); red = 0; } else if(red == 0) { bombilla.material.color.set(0xFF0000); red = 1; } } var update = function() { setInterval(changeColor,2000); }; var render = function() { renderer.render(scene, camera); }; var GameLoop = function() { //requestAnimationFrame(GameLoop); init(); update(); render(); }; GameLoop(); ,我猜这是最后一个问题(项目中缺少文件),您是否已正确添加Firebase SDK /资源?

答案 1 :(得分:0)

似乎您的项目中缺少名为ic_stat_ic_notification的文件。

打开您的项目。
转到android/app/src/main/res/drawable,检查是否有名称为ic_stat_ic_notification的文件...
如果不可用,请在可绘制文件夹中添加具有该名称的文件。

建议:-
我建议您将具有该名称的应用程序图标添加到drawable文件夹中(因为文件名包含通知,所以它可能是通知图标文件)。

答案 2 :(得分:0)

我认为您需要做的是将一个名为df.reset_index(drop=True, inplace=True) 的新文件添加到drawable文件夹中,然后重试构建该项目。

我还建议您在原始问题中添加项目结构的屏幕截图,以便我们了解其内容。