Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Cannot build application after linking (processReleaseResources FAILED) #376

Closed
ChristianTucker opened this issue May 30, 2017 · 1 comment

Comments

@ChristianTucker
Copy link

ChristianTucker commented May 30, 2017

I would like to make it clear that we have had no problems until installing react-native-fetch-blob, and in removing the library the problem goes away and we can build.

Library versions:

  • react: 16.0.0-alpha.6
  • react-native: 0.44.2
  • react-native-fetch-blob: ^0.10.5

Operating System: Windows 10 Pro 64-Bit.
Building for: Android

Errors:

C:\Programming\project\node_modules\react-native-fetch-blob\android\build\intermediates\manifests\aapt\release\A
ndroidManifest.xml:11:33-49: AAPT: No resource found that matches the given name (at 'label' with value '@string/app_name').

C:\Programming\project\node_modules\react-native-fetch-blob\android\build\intermediates\manifests\aapt\release\A
ndroidManifest.xml:11: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').


:react-native-fetch-blob:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-fetch-blob:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

I've read that this may be due to windows having a file-path limit of 260 characters, however I modified my registry to allow long paths, and I'm still running into this issue, so I think it may be something else. I also have other projects in the same directory that are using react-native-fetch-blob just fine, so I'm not sure what the problem may be.

Any help would be greatly appreciated.


Even though I've already stated that I'm sure the problem has something to do with this repository, even if it's not a direct problem, I wanted to provide a little more information so people don't assume that my strings.xml doesn't include the app_name value.

Here's my strings.xml

<resources>
    <string name="app_name">project</string>
</resources>

As I said before, without react-native-fetch-blob the project will compile, however we depend on this module for our file cache.

I've also tried a manual link instead of using react-native link and I've ran into the same problems.


I think this may have to do with the AndroidManifest here and the Strings.xml here not communicating well with eachother for some reason, but I may be wrong. I just can't think of any other reason for this. In my node_modules folder, following the directory into the build path, I cannot locate a strings.xml anywhere.

@ChristianTucker
Copy link
Author

For anyone who runs into this issue in the future, it was ultimately a problem with the path limit on windows as I expected, here is the solution for your Android project. Nothing needs to be done for iOS as you can't build iOS on windows, and this problem does not exist on Mac.

Credit: https://stackoverflow.com/questions/33905687/error-file-path-too-long-on-windows-keep-below-240-characters/34680168#34680168


Open your project and go to the android/build.gradle file, NOTE not the one in the app folder. Under allprojects { you're going to want to add this line, before repositories {

buildDir = "C:/Programming/${rootProject.name}/${project.name}"

Now, you will need to change C:/Programming/ to whatever the base file path to your project is, as this is where I keep all of my projects, but this solved the issue for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants