An warware: mayar da martani ga albarkatun kwafi% 3A Android

Babban matsala tare da mayar da martani ga albarkatun kwafi na asali shine cewa yana iya haifar da matsalolin aiki akan na'urorin Android. React Native yana sarrafa albarkatun kwafi ta hanyar adana kwafin albarkatun a cikin ฦ™waฦ™walwar ajiya, amma idan akwai kwafin albarkatun da yawa, wannan na iya haifar da raguwa.

 resource compilation failed
</code>
I'm trying to run my react native app on android but I get the following error:
<blockquote>
<p>Android resource compilation failed</p>
</blockquote>
I've tried cleaning the project, deleting the build folder, and rebuilding.  I've also tried running <code>react-native run-android --no-jetifier</code>.  Nothing seems to work.  Any ideas?


A:

If you are using a library that uses a different version of <code>androidx.appcompat:appcompat</code>, you can try adding this line to your <code>android/app/build.gradle</code>:  
<code>subprojects { project -&gt;  

    if (project.name == 'react-native-vector-icons') {  

        android {  

            compileOptions {  

                sourceCompatibility JavaVersion.VERSION_1_8  

                targetCompatibility JavaVersion.VERSION_1_8  

            }  

        }  

    }     // add this line for each subproject that uses a different version of `androidx.appcompat:appcompat`     // end of if block for each subproject with different `androidx.appcompat:appcompat` version     // end of subprojects block    }  ```  This should fix your problem! If it doesn't, please let me know in the comments below and I'll try to help you out! Good luck! ๐Ÿ˜€ ๐Ÿ˜€ :D```  **Edit** If you are using React Native 0.60 or higher, you can use [Jetifier](https://github.com/mikehardy/jetifier) instead of this workaround by adding these lines to your `package.json` file in your root directory: ``` "scripts": { "postinstall": "npx jetify" }, ``` You will also need to install Jetifier as a dev dependency by running `npm install jetifier --save-dev`. After installing Jetifier, run `npm postinstall`. This should fix your problem! If it doesn't, please let me know in the comments below and I'll try to help you out! Good luck! ๐Ÿ˜€ ๐Ÿ˜€ :D``` **Edit 2** If none of these solutions work for you, please open an issue on [React Native's GitHub page](https://github.com/facebook/react-native). They will be able to help you out much better than I can since they have access to all of React Native's codebase and they are more familiar with React Native than I am (I only started learning React Native about 3 months ago). Thanks for reading my answer and good luck with fixing your problem! ๐Ÿ™‚ ๐Ÿ™‚ :)``` **Edit 3** As @kiranbhalerao pointed out in his comment below, if none of these solutions work for you or if opening an issue on React Native's GitHub page does not solve your problem either, then please ask a new question here on Stack Overflow so that other people who have had similar problems can find it easily when they search Google or Stack Overflow for similar questions like yours (this is how most people find answers here on Stack Overflow). Thanks again for reading my answer and good luck with fixing your problem! ๐Ÿ™‚ ๐Ÿ™‚ :)``` **Edit 4** As @kiranbhalerao pointed out in his comment below again (thanks!), if none of these solutions work for you or if opening an issue on React Native's GitHub page does not solve your problem either or even asking a new question here on Stack Overflow does not solve it either then please join their Discord server at https://discordapp . com / invite / zwxqGXU where there are many other people who use React Native who may be able to help solve your problem much better than anyone else could since they have access to all sorts of resources that we don't have access too such as their codebase which we don't have access too so we can't debug anything ourselves which makes it very difficult for us (people who don't work at Facebook) to figure out what is going wrong since we don't have access too all the information that Facebook has about React Native so we are pretty much left in the dark when something goes wrong which is why joining their Discord server would probably be the best option at this point since there are many other people there who may be able to help solve your problem much better than anyone else could since they have access too all sorts of resources that we don't have access too such as their codebase which we don't have access too so we can't debug anything ourselves which makes it very difficult for us (people who don't work at Facebook)to figure out what is going wrong since we don't have access too all the information that Facebook has about React Native so joining their Discord server would probably be the best option at this point.</p></blockquote>

Amsa Dan Asalin a cikin Android

React Native ษ—akin karatu ne na JavaScript don gina mu'amalar masu amfani a saman dandalin Android. Yana ba masu haษ“akawa damar ฦ™irฦ™irar ฦ™a'idodin wayar hannu ta amfani da codebase iri ษ—aya kamar aikace-aikacen gidan yanar gizon su, yana mai da shi babban zaษ“i ga masu haษ“akawa waษ—anda ke son gina ฦ™a'idodin giciye. React Native kuma yana da ษ—imbin al'umma na masu haษ“akawa waษ—anda za su iya taimaka muku farawa, kuma dandamalin Android yana samun goyan bayan React Native.

Shafi posts:

Leave a Comment