shoutem / ui

Customizable set of components for React Native applications
Other
4.9k stars 454 forks source link

Android build fails due to a dependency #380

Open omairvaiyani opened 6 years ago

omairvaiyani commented 6 years ago

I get the following error when running react-native run-android:

/Users/[user]/Documents/github/[my-app]/node_modules/react-native-photo-view/android/src/main/java/com/reactnative/photoview/ImageEvent.java:37: error: no suitable constructor found for Event(int)
    super(viewId);
    ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int,long) is not applicable
      (actual and formal argument lists differ in length)
Note: /Users/[user]/Documents/github/[my-app]/node_modules/react-native-photo-view/android/src/main/java/com/reactnative/photoview/ResourceDrawableIdHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:react-native-photo-view:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Whilst I could post this issue to 'react-native-photo-view', I am curious if anyone else is facing this problem? I dug up this solution to downgrade the depency to 1.2.0 (currently ~1.5.0 in shoutem/ui). Manually setting this repo to 1.2.0 resulted in a chain of further errors .

Can anyone test out my package.json and see if it builds? I've tried running gradle clean and rebuilding but to no luck.


  "name": "App Name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native-scripts start",
    "test": "jest",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force",
    "clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android",
    "newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm i",
    "test:watch": "jest --watch",
    "updateSnapshot": "jest --updateSnapshot",
    "coverage": "jest --coverage && open coverage/lcov-report/index.html || xdg-open coverage/lcov-report/index.html",
    "android:build": "cd android && ./gradlew assembleRelease",
    "android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease",
    "android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk",
    "android:devices": "$ANDROID_HOME/platform-tools/adb devices",
    "android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V",
    "android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82",
    "storybook": "storybook start -p 7007",
    "lint": "standard --verbose | snazzy",
    "lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
    "fixcode": "standard --fix",
    "git-hook": "npm run lint -s && npm run test -s"
  },
  "dependencies": {
    "@shoutem/animation": "^0.12.2",
    "@shoutem/ui": "0.23.0",
    "apisauce": "^0.14.3",
    "expo": "^25.0.0",
    "format-json": "^1.0.3",
    "identity-obj-proxy": "^3.0.0",
    "lodash": "^4.17.4",
    "prop-types": "15.6.0",
    "querystringify": "1.0.0",
    "ramda": "^0.25.0",
    "react": "16.2.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz",
    "react-native-global-props": "^1.1.3",
    "react-native-modal": "^5.2.0",
    "react-native-status-bar-height": "^2.0.0",
    "react-native-vector-icons": "^4.5.0",
    "react-navigation": "1.0.0-beta.11",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2",
    "redux-persist": "4.1.0",
    "redux-saga": "^0.16.0",
    "reduxsauce": "0.7.0",
    "seamless-immutable": "^7.1.2"
  },
  "devDependencies": {
    "@storybook/addon-storyshots": "^3.2.16",
    "@storybook/addons": "^3.2.16",
    "@storybook/channels": "^3.2.16",
    "@storybook/react-native": "^3.2.16",
    "babel-core": "6.26.0",
    "babel-eslint": "7.1.1",
    "babel-jest": "22.4.1",
    "babel-plugin-ignite-ignore-reactotron": "^0.3.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react-native": "^4.0.0",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.0",
    "husky": "^0.14.3",
    "ignite-dev-screens-expo": "^0.1.0",
    "ignite-expo": "^0.25.3",
    "ignite-standard": "^1.0.0",
    "jest": "22.4.2",
    "jest-expo": "^25.0.0",
    "mockery": "^2.1.0",
    "react-addons-test-utils": "^15.6.2",
    "react-dom": "^16.2.0",
    "react-native-scripts": "1.10.0",
    "react-test-renderer": "16.0.0",
    "reactotron-react-native": "^1.14.0",
    "reactotron-redux": "^1.13.0",
    "reactotron-redux-saga": "^1.13.0",
    "snazzy": "^7.0.0",
    "standard": "10.0.2"
  },
  "jest": {
    "testMatch": [
      "<rootDir>/Tests/**/*.js",
      "**/?(*.)(spec|test).js?(x)"
    ],
    "testPathIgnorePatterns": [
      "/node_modules/",
      "<rootDir>/Tests/Setup.js"
    ],
    "moduleNameMapper": {
      "^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "identity-obj-proxy"
    },
    "setupFiles": [
      "<rootDir>/Tests/Setup"
    ],
    "preset": "jest-expo"
  },
  "main": "index.js",
  "config": {},
  "standard": {
    "parser": "babel-eslint",
    "globals": [
      "describe",
      "test",
      "jest",
      "expect",
      "fetch",
      "navigator",
      "__DEV__",
      "XMLHttpRequest",
      "FormData",
      "React$Element"
    ]
  }
}```
Gowtham03 commented 6 years ago

me too