{"action":"created","issue":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/4203","repository_url":"https://api.github.com/repos/wix/react-native-navigation","labels_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4203/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4203/comments","events_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4203/events","html_url":"https://github.com/wix/react-native-navigation/issues/4203","id":373067961,"node_id":"MDU6SXNzdWUzNzMwNjc5NjE=","number":4203,"title":"Task :react-native-navigation:compileReactNative56DebugJavaWithJavac FAILED. Problems with Android Emulator. Wix RNN React Native Navigation ","user":{"login":"PurnimaNaik","id":33334848,"node_id":"MDQ6VXNlcjMzMzM0ODQ4","avatar_url":"https://avatars1.githubusercontent.com/u/33334848?v=4","gravatar_id":"","url":"https://api.github.com/users/PurnimaNaik","html_url":"https://github.com/PurnimaNaik","followers_url":"https://api.github.com/users/PurnimaNaik/followers","following_url":"https://api.github.com/users/PurnimaNaik/following{/other_user}","gists_url":"https://api.github.com/users/PurnimaNaik/gists{/gist_id}","starred_url":"https://api.github.com/users/PurnimaNaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PurnimaNaik/subscriptions","organizations_url":"https://api.github.com/users/PurnimaNaik/orgs","repos_url":"https://api.github.com/users/PurnimaNaik/repos","events_url":"https://api.github.com/users/PurnimaNaik/events{/privacy}","received_events_url":"https://api.github.com/users/PurnimaNaik/received_events","type":"User","site_admin":false},"labels":[{"id":800623034,"node_id":"MDU6TGFiZWw4MDA2MjMwMzQ=","url":"https://api.github.com/repos/wix/react-native-navigation/labels/type:%20question/stack%20overflow","name":"type: question/stack overflow","color":"FF9900","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-23T15:41:32Z","updated_at":"2018-10-24T16:46:33Z","closed_at":"2018-10-24T11:01:35Z","author_association":"NONE","body":"I am trying to set up a new project from scratch.\r\n\r\n```\r\n    \"react-native\": \"^0.57.3\",\r\n    \"react-native-navigation\": \"^2.0.2608\"\r\n```\r\n\r\n### Tried/Integrated the following:-\r\n\r\n1. `missingDimensionStrategy \"RNN.reactNativeVersion\", \"reactNative56\"`\r\n\r\n 2. \r\n```\r\nsubprojects { subproject ->\r\n  afterEvaluate {\r\n     if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {\r\n        android {\r\n          variantFilter { variant ->\r\n             def names = variant.flavors*.name\r\n                if (names.contains(\"reactNative51\") || names.contains(\"reactNative55\")) {\r\n                  setIgnore(true)\r\n                  }}}}}}\r\n```\r\n\r\n3. \r\n```\r\nconfigurations.all {\r\n  resolutionStrategy {\r\n    eachDependency { DependencyResolveDetails details ->\r\n       if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {\r\n         details.useVersion \"0.57.3\" // Your real React Native version here\r\n       }}}}\r\n```\r\n4. `chmod 755 android/gradlew`\r\n5. `react-native run-android --variant debug`\r\n\r\n### Everything boils down to these 2 errors on Android:-\r\n\r\n1. `npm run android` - **Task :react-native-navigation:compileReactNative56DebugJavaWithJavac FAILED**\r\n\r\n2.  `react-native run-android` - **Could not install the app on the device, read the error above for details.\r\nMake sure you have an Android emulator running or a device connected and have\r\nset up your Android development environment**\r\n\r\nIf I directly run the emulator from Android studio, everything works well.\r\n\r\n### Downgrading to react-native 0.56.0 throws this error \r\nOn iOS:-\r\nFailed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(/Users/\"system-name\"/\"project-name\"/index.js: .overrides is not allowed in preset options (null))\r\n\r\nOn Android:-\r\nTask :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED\r\nD8: Program type already present: android.support.design.widget.CoordinatorLayout$Behavior\r\n\r\nI would prefer a solution that won't require downgrading from react-native 0.57.3. \r\n\r\nAny ideas?\r\n\r\n_Originally posted by @PurnimaNaik in https://github.com/wix/react-native-navigation/issue_comments#issuecomment-432299031_"},"comment":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/comments/432736522","html_url":"https://github.com/wix/react-native-navigation/issues/4203#issuecomment-432736522","issue_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4203","id":432736522,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjczNjUyMg==","user":{"login":"PurnimaNaik","id":33334848,"node_id":"MDQ6VXNlcjMzMzM0ODQ4","avatar_url":"https://avatars1.githubusercontent.com/u/33334848?v=4","gravatar_id":"","url":"https://api.github.com/users/PurnimaNaik","html_url":"https://github.com/PurnimaNaik","followers_url":"https://api.github.com/users/PurnimaNaik/followers","following_url":"https://api.github.com/users/PurnimaNaik/following{/other_user}","gists_url":"https://api.github.com/users/PurnimaNaik/gists{/gist_id}","starred_url":"https://api.github.com/users/PurnimaNaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PurnimaNaik/subscriptions","organizations_url":"https://api.github.com/users/PurnimaNaik/orgs","repos_url":"https://api.github.com/users/PurnimaNaik/repos","events_url":"https://api.github.com/users/PurnimaNaik/events{/privacy}","received_events_url":"https://api.github.com/users/PurnimaNaik/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T16:46:33Z","updated_at":"2018-10-24T16:46:33Z","author_association":"NONE","body":"Had to move to React Native 0.56.0\r\n\r\nI ran the following in the project directory:-\r\n`brew install gradle`\r\n`gradle wrapper`\r\n`./gradlew build`\r\n\r\nAdded `implementation'com.android.support:design:27.1.0` to app level build.gradle\r\nIf you don't, you will get this error-\r\n```\r\n> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED\r\nD8: Program type already present: android.support.design.widget.CoordinatorLayout$Behavior\r\n```\r\n\r\nThen, ran the following in the **android** directory inside my project:- `./gradlew app:assembleDebug`\r\n\r\nIf you don't run the command in the app directory, you will get this error:-\r\n`Project 'app' not found in root project 'Project-name'.`\r\n\r\n**It builds successfully.**\r\n\r\nThen I ran `npm run android` and `react-native run-android` on separate occasions to test both commands. The build is successful using both commands.  \r\n\r\n`react-native run-android` pulls up the app on emulator which is nice since `npm run android` doesn't do that.\r\n\r\nNow, I have a new problem- `The development server returned response error code: 500` \r\nApparently this is a problem with RN v 0.56 so to solve the error, you need to downgrade to 55.4 or 55.3. But if I do that, then I am back to square one with this error-\r\n`Execution failed for task ':react-native-navigation:compileReactNative56DebugJavaWithJavac'.`\r\n\r\nEven if I follow all the steps listed above that helped me get rid of the issue with 0.56, it does not help with 0.55^. Not sure if it has anything to do with RNN. From what I can tell it has to do with the metro-react-native-babel-preset. \r\n\r\n😫No end in sight. If anyone has any leads please let me know! \r\n"}}
{"actor":{"display_login":"PurnimaNaik"}}