{"action":"created","issue":{"url":"https://api.github.com/repos/react-native-community/react-native-camera/issues/1588","repository_url":"https://api.github.com/repos/react-native-community/react-native-camera","labels_url":"https://api.github.com/repos/react-native-community/react-native-camera/issues/1588/labels{/name}","comments_url":"https://api.github.com/repos/react-native-community/react-native-camera/issues/1588/comments","events_url":"https://api.github.com/repos/react-native-community/react-native-camera/issues/1588/events","html_url":"https://github.com/react-native-community/react-native-camera/issues/1588","id":327033125,"node_id":"MDU6SXNzdWUzMjcwMzMxMjU=","number":1588,"title":"Project wont build. What should the gradle and project setup be with RNCamera?","user":{"login":"timjam","id":11800806,"node_id":"MDQ6VXNlcjExODAwODA2","avatar_url":"https://avatars0.githubusercontent.com/u/11800806?v=4","gravatar_id":"","url":"https://api.github.com/users/timjam","html_url":"https://github.com/timjam","followers_url":"https://api.github.com/users/timjam/followers","following_url":"https://api.github.com/users/timjam/following{/other_user}","gists_url":"https://api.github.com/users/timjam/gists{/gist_id}","starred_url":"https://api.github.com/users/timjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timjam/subscriptions","organizations_url":"https://api.github.com/users/timjam/orgs","repos_url":"https://api.github.com/users/timjam/repos","events_url":"https://api.github.com/users/timjam/events{/privacy}","received_events_url":"https://api.github.com/users/timjam/received_events","type":"User","site_admin":false},"labels":[{"id":418407111,"node_id":"MDU6TGFiZWw0MTg0MDcxMTE=","url":"https://api.github.com/repos/react-native-community/react-native-camera/labels/Android","name":"Android","color":"bfe5bf","default":false},{"id":194397263,"node_id":"MDU6TGFiZWwxOTQzOTcyNjM=","url":"https://api.github.com/repos/react-native-community/react-native-camera/labels/Bug","name":"Bug","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-05-28T13:49:02Z","updated_at":"2018-10-31T11:06:04Z","closed_at":"2018-05-29T13:32:48Z","author_association":"NONE","body":"I just installed all the latest things: Android studio, react-native-cli, react-native-camera, system-images, gradles etc etc, but still I can't get react-native-camera work at all in any project. What is the preferred gradle and project configuration to get this package work?\r\n\r\n### Steps to reproduce\r\n0. npm install -g react-native-cli\r\n1. react-native init testapp\r\n2. npm install react-native-camera --save\r\n3. yarn   **(without this react-native link wont work!)**\r\n4. react-native link react-native-camera\r\n5. change classpath to 'com.android.tools.build:gradle:3.0.0' in build.gradle\r\n6. Change Gradle wrapper to 4.1 in gradle.properties  **(Required by the gradle 3.0.0)**\r\n7. Removed buildToolsVersion from app/build.gradle  **(Supresses one warning)**\r\n\r\nNow if you try to run react-native run-android you end up getting lots of errors. These I fixed with these solutions found from all over internet:\r\n\r\nAdded this snippet \r\n\r\n```\r\nsubprojects {\r\n  project.configurations.all {\r\n     resolutionStrategy.eachDependency { details ->\r\n        if (details.requested.group == 'com.android.support'\r\n              && !details.requested.name.contains('multidex') ) {\r\n           details.useVersion \"27.1.0\"\r\n        }\r\n     }\r\n  }\r\n}\r\n\r\n```\r\nto root's build.gradle file to remove this error \r\n\r\n_\"Android dependency 'com.android.support:support-v4' has different version for the compile (23.0.1) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution\"_\r\n\r\n\r\nThen I added \r\n`android.enableAapt2=false`\r\nto gradle.properties, because I was getting this error:\r\n\r\n\r\n_Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details_\r\n\r\nAt this point I figured out that\r\na) setting aapt to false doesn't actually fix the problem, but hides the cause and I have no idea what's the actual cause\r\nb) maybe I am doing something completely wrong right from the beginning?\r\n\r\n### Does it work with Expo Camera?\r\nI've managed to get Expo camera work. This problem is might not actually be a problem with the RNCamera itself, but rather it is not compatible with the latest gradle setups.\r\n\r\n### Expected behaviour\r\nBy following the instructions given on the installation part, one should be able to use the package in their projects\r\n\r\n### Actual behaviour\r\nProject wont build\r\n\r\n### Environment\r\nNode 9.8.0\r\nnpm 5.6.0\r\nreact-native 0.55.4\r\nAndroid 6, Android 8\r\n\r\n### react-native-camera\r\nreact-native-camera 1.1.4\r\n"},"comment":{"url":"https://api.github.com/repos/react-native-community/react-native-camera/issues/comments/434646634","html_url":"https://github.com/react-native-community/react-native-camera/issues/1588#issuecomment-434646634","issue_url":"https://api.github.com/repos/react-native-community/react-native-camera/issues/1588","id":434646634,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDY0NjYzNA==","user":{"login":"timjam","id":11800806,"node_id":"MDQ6VXNlcjExODAwODA2","avatar_url":"https://avatars0.githubusercontent.com/u/11800806?v=4","gravatar_id":"","url":"https://api.github.com/users/timjam","html_url":"https://github.com/timjam","followers_url":"https://api.github.com/users/timjam/followers","following_url":"https://api.github.com/users/timjam/following{/other_user}","gists_url":"https://api.github.com/users/timjam/gists{/gist_id}","starred_url":"https://api.github.com/users/timjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timjam/subscriptions","organizations_url":"https://api.github.com/users/timjam/orgs","repos_url":"https://api.github.com/users/timjam/repos","events_url":"https://api.github.com/users/timjam/events{/privacy}","received_events_url":"https://api.github.com/users/timjam/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T11:06:04Z","updated_at":"2018-10-31T11:06:04Z","author_association":"NONE","body":"@sharibtanweer What have you tried so far? Upgrading to latest gradle should fix the issue. What's your setup?"}}
{"actor":{"display_login":"timjam"}}