{"action":"created","issue":{"url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat/issues/3","repository_url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat","labels_url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat/issues/3/comments","events_url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat/issues/3/events","html_url":"https://github.com/kraffslol/react-native-braintree-xplat/issues/3","id":166915860,"number":3,"title":"Won't compile on Android","user":{"login":"AdamBrodzinski","id":1445367,"avatar_url":"https://avatars.githubusercontent.com/u/1445367?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamBrodzinski","html_url":"https://github.com/AdamBrodzinski","followers_url":"https://api.github.com/users/AdamBrodzinski/followers","following_url":"https://api.github.com/users/AdamBrodzinski/following{/other_user}","gists_url":"https://api.github.com/users/AdamBrodzinski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamBrodzinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamBrodzinski/subscriptions","organizations_url":"https://api.github.com/users/AdamBrodzinski/orgs","repos_url":"https://api.github.com/users/AdamBrodzinski/repos","events_url":"https://api.github.com/users/AdamBrodzinski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamBrodzinski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-21T20:56:28Z","updated_at":"2016-07-25T06:45:14Z","closed_at":null,"body":"Hello, i'm able to run this on iOS but am having issues with Android. I ran `rnpm link` and that changed some files on Android but i'm not sure what these errors are getting at. Would you have any insight on what I should try next?\r\n\r\n\r\n\r\n**Versions**\r\n\r\n- react-native 0.30.0\r\n- react 15.2\r\n\r\n**Expected:**\r\nAndroid to compile with `react-native run-android`\r\n\r\n**Actual:**\r\nError message:\r\n\r\n```\r\n:app:generateDebugSources UP-TO-DATE\r\n:app:processDebugJavaRes UP-TO-DATE\r\n:app:compileDebugJavaWithJavac\r\n/Users/adam/Projects/acme/myapp-mobile/android/app/src/main/java/com/myapp/MainActivity.java:38: error: method does not override or implement a method from a supertype\r\n    @Override\r\n    ^\r\n/Users/adam/Projects/acme/myapp-mobile/android/app/src/main/java/com/myapp/MainActivity.java:43: error: constructor BraintreePackage in class BraintreePackage cannot be applied to given types;\r\n            new BraintreePackage(),\r\n            ^\r\n  required: Context\r\n  found: no arguments\r\n  reason: actual and formal argument lists differ in length\r\n/Users/adam/Projects/acme/myapp-mobile/android/app/src/main/java/com/myapp/MainActivity.java:45: error: constructor BraintreePackage in class BraintreePackage cannot be applied to given types;\r\n            new BraintreePackage()\r\n            ^\r\n  required: Context\r\n  found: no arguments\r\n  reason: actual and formal argument lists differ in length\r\n3 errors\r\n:app:compileDebugJavaWithJavac FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n```\r\n\r\n\r\n\r\nMy MainActivity.java file looks like:\r\n\r\n```\r\npackage com.myapp;\r\n\r\nimport com.facebook.react.ReactActivity;\r\nimport com.oblador.vectoricons.VectorIconsPackage;\r\nimport com.pw.droplet.braintree.BraintreePackage;\r\nimport com.facebook.react.ReactPackage;\r\nimport com.facebook.react.shell.MainReactPackage;\r\n\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\n\r\npublic class MainActivity extends ReactActivity {\r\n\r\n    /**\r\n     * Returns the name of the main component registered from JavaScript.\r\n     * This is used to schedule rendering of the component.\r\n     */\r\n    @Override\r\n    protected String getMainComponentName() {\r\n        return \"MyApp\";\r\n    }\r\n\r\n    /**\r\n     * Returns whether dev mode should be enabled.\r\n     * This enables e.g. the dev menu.\r\n     */\r\n    @Override\r\n    protected boolean getUseDeveloperSupport() {\r\n        return BuildConfig.DEBUG;\r\n    }\r\n\r\n    /**\r\n     * A list of packages used by the app. If the app uses additional views\r\n     * or modules besides the default ones, add more packages here.\r\n     */\r\n    @Override\r\n    protected List<ReactPackage> getPackages() {\r\n        return Arrays.<ReactPackage>asList(\r\n            new MainReactPackage(),\r\n            new VectorIconsPackage(),\r\n            new BraintreePackage()\r\n        );\r\n    }\r\n}\r\n```\r\n\r\n\r\nI've also tried to go back to React Native `0.26` to see if that would help and it gives me less errors with:\r\n\r\n```\r\n:app:generateDebugSources\r\n:app:processDebugJavaRes UP-TO-DATE\r\n:app:compileDebugJavaWithJavac\r\n/Users/adam/Projects/acme/myapp-mobile/android/app/src/main/java/com/myapp/MainActivity.java:41: error: constructor BraintreePackage in class BraintreePackage cannot be applied to given types;\r\n            new BraintreePackage()\r\n            ^\r\n  required: Context\r\n  found: no arguments\r\n  reason: actual and formal argument lists differ in length\r\n1 error\r\n:app:compileDebugJavaWithJavac FAILED\r\n```\r\n\r\nAny help would be appreciated!!"},"comment":{"url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat/issues/comments/234853081","html_url":"https://github.com/kraffslol/react-native-braintree-xplat/issues/3#issuecomment-234853081","issue_url":"https://api.github.com/repos/kraffslol/react-native-braintree-xplat/issues/3","id":234853081,"user":{"login":"joelcloralt","id":881780,"avatar_url":"https://avatars.githubusercontent.com/u/881780?v=3","gravatar_id":"","url":"https://api.github.com/users/joelcloralt","html_url":"https://github.com/joelcloralt","followers_url":"https://api.github.com/users/joelcloralt/followers","following_url":"https://api.github.com/users/joelcloralt/following{/other_user}","gists_url":"https://api.github.com/users/joelcloralt/gists{/gist_id}","starred_url":"https://api.github.com/users/joelcloralt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelcloralt/subscriptions","organizations_url":"https://api.github.com/users/joelcloralt/orgs","repos_url":"https://api.github.com/users/joelcloralt/repos","events_url":"https://api.github.com/users/joelcloralt/events{/privacy}","received_events_url":"https://api.github.com/users/joelcloralt/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T06:45:14Z","updated_at":"2016-07-25T06:45:14Z","body":"@kraffslol @AdamBrodzinski thanks for the response. I was about to post an update. I was able to compile but I'm pretty sure this is not the right solution. \r\n\r\nI just added this to `Braintree.java`:\r\n```\r\n@Override\r\npublic void onNewIntent(Intent intent){\r\n}\r\n```\r\n\r\nRight now I'm dealing with the fact that `BTClient.setup(token)` is returning `Invalid Token` all the time. With the [demo token](https://developers.braintreepayments.com/start/hello-client/ios/v3#get-a-client-token) and with the token generated by my server. And this is with iOS so I don't think this hack I did is related."}}
{"actor":{"display_login":"joelcloralt"}}