Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failing after installing react-native-image-crop-picker #1416

Closed
PavanTank4631 opened this issue Sep 27, 2020 · 21 comments
Closed

Build failing after installing react-native-image-crop-picker #1416

PavanTank4631 opened this issue Sep 27, 2020 · 21 comments

Comments

@PavanTank4631
Copy link

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.35.0
  • react-native v0.63.2

Platform

Tell us to which platform this issue is related

  • Android => Not working
  • IOS => Working

Expected behaviour

Actual behaviour

  • What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     D:\Project\node_modules\react-native-image-crop-picker\android\build\intermediates\library_manifest\debug\AndroidManifest.xml:10:5-14:15: AAPT: error: unexpected element <queries> found in <manifest>.

Steps to reproduce

Just open android studio, and try to run app, it will show this error

I have found same issue here. she downgrade to lower version, I am hoping to use latest version with your fix.
https://stackoverflow.com/questions/64022942/build-failing-after-installing-react-native-image-crop-picker

@SUMITIOS
Copy link

@PavanTank4631 The solution is there in the same stackoverflow link that you have provided:
No need to downgrade to 0.33.

Upgrade your gradle version by adding classpath 'com.android.tools.build:gradle:4.0.1' in your android/build.gradle file:
buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.0.1' } }

@SUMITIOS
Copy link

And also run cd android then ./gradlew clean (for mac) after upgrading and rebuild the app. The issue will be gone.

@ninkambazi
Copy link

gradlew clean

if you still have some new complicated errors you can also delete the build file in android/app/build and run the app it will then work fine

@oleksandr-dziuban
Copy link

@ivpusic Hello, can this issue be addressed to maintainers? Thanks a lot

@bhsrampage
Copy link

its not working Plz address the issue ASAP....

@jacquesdev
Copy link

I had to do the following to get it working:

  1. Upgrade your gradle version by adding classpath 'com.android.tools.build:gradle:4.0.1' in your android/build.gradle
  2. In gradle-wrapper.properties, update the path to services.gradle.org/distributions/gradle-6.1.1-all.zip (upgrade to version 6)

I am using react-native v0.61.5

@ivpusic
Copy link
Owner

ivpusic commented Oct 1, 2020

Minimum Gradle version if you are using react-native-image-crop-picker >= 0.35.0

3.3.3
3.4.3
3.5.4
3.6.4
4.0.1

Reference for more details #1406

@ivpusic ivpusic closed this as completed Oct 1, 2020
@veerareddyvishal144
Copy link

I have tried out all the above ones. Not working

@ivpusic
Copy link
Owner

ivpusic commented Oct 1, 2020

maybe try also ./gradlew clean, ./gradlew cleanBuildCache from android folder

@veerareddyvishal144
Copy link

Still the issue is persisting

@oleksandr-dziuban
Copy link

oleksandr-dziuban commented Oct 1, 2020

@ivpusic This is not a cache problem. Issue reproducible locally and on CI for all build from scratch, please reopen

P.S. Upgrade gradle to 4.0.1 fixed the issue
classpath('com.android.tools.build:gradle:4.0.1') in android/build.gradle

@ivpusic
Copy link
Owner

ivpusic commented Oct 1, 2020

gradle upgrade is required in order to use 0.35.0 version. if you cannot upgrade, please use version <0.35.0

@a-eid
Copy link

a-eid commented Nov 16, 2020

I'm having this issue still.

@MedDimessi
Copy link

I upgraded to classpath('com.android.tools.build:gradle:4.0.1') it told me to update the gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip. It managed to work on debug mode, however, when generating the release apk after ./gradlew clean and ./gradlew assembleRelease , the app crashes the second it opens!! any idea why upgrading the gradle causes this immediate crash on release mode but not on debug mode??

@niip00ng
Copy link

niip00ng commented Feb 9, 2021

add buildscript ext supportLibVersion = "28.0.0"

like this

buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}

@maheenriaz
Copy link

@PavanTank4631 The solution is there in the same stackoverflow link that you have provided:
No need to downgrade to 0.33.

Upgrade your gradle version by adding classpath 'com.android.tools.build:gradle:4.0.1' in your android/build.gradle file:
buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.0.1' } }

Great solution!!!!
It worked <3

@michael-monty
Copy link

michael-monty commented Mar 30, 2021

I tried

classpath 'com.android.tools.build:gradle:4.0.1'
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

and then did ./gradlew clean, ./gradlew cleanBuildCache

but it didn't work

I then ignored/undid changes mentioned in this step (Leaving them as they were):

Use Android SDK >= 26 (android/app/build.gradle)

  android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
      ...
      
      defaultConfig {
        ...
        targetSdkVersion 27
        ...
      }
      ...
  }

And it built (I kept the upgraded gradle 4.0.1/6.1.1

@AbdullahAnsarii
Copy link

And also run cd android then ./gradlew clean (for mac) after upgrading and rebuild the app. The issue will be gone.

also do '.\gradlew --refresh-dependencies' after ./gradlew clean

@AliZia110
Copy link

Hi,In the project that I created two weeks ago and older projects, when I install this library, I encounter the same error, but when I initiated a new project, it was successful, now I do not know why it does not appear on my previous project,thank you if help me

@AliZia110
Copy link

for android

@ravindra3003
Copy link

I am facing same issue

"react-native": "0.64.2"
"react-native-image-crop-picker": "^0.32.2",

also I have tried 0.35.0

My current gradlew

classpath("com.android.tools.build:gradle:4.1.0")
distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip

`1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-image-crop-picker:compileDebugLibraryResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.1-6197926-osx Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.`

Also I got some Warning like this

Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests