{"action":"closed","issue":{"url":"https://api.github.com/repos/androidannotations/androidannotations/issues/1897","repository_url":"https://api.github.com/repos/androidannotations/androidannotations","labels_url":"https://api.github.com/repos/androidannotations/androidannotations/issues/1897/labels{/name}","comments_url":"https://api.github.com/repos/androidannotations/androidannotations/issues/1897/comments","events_url":"https://api.github.com/repos/androidannotations/androidannotations/issues/1897/events","html_url":"https://github.com/androidannotations/androidannotations/issues/1897","id":189698464,"number":1897,"title":"zxing CaptureManager openCameraWithPermission function not work","user":{"login":"kubraozer","id":23330270,"avatar_url":"https://avatars.githubusercontent.com/u/23330270?v=3","gravatar_id":"","url":"https://api.github.com/users/kubraozer","html_url":"https://github.com/kubraozer","followers_url":"https://api.github.com/users/kubraozer/followers","following_url":"https://api.github.com/users/kubraozer/following{/other_user}","gists_url":"https://api.github.com/users/kubraozer/gists{/gist_id}","starred_url":"https://api.github.com/users/kubraozer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubraozer/subscriptions","organizations_url":"https://api.github.com/users/kubraozer/orgs","repos_url":"https://api.github.com/users/kubraozer/repos","events_url":"https://api.github.com/users/kubraozer/events{/privacy}","received_events_url":"https://api.github.com/users/kubraozer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-16T13:07:17Z","updated_at":"2016-11-16T13:21:11Z","closed_at":"2016-11-16T13:21:11Z","body":"`\r\nimport android.support.v4.app.ActivityCompat;\r\nimport android.support.v4.content.ContextCompat;\r\n...\r\n\r\n`\r\n`@TargetApi(23)\r\n    private void openCameraWithPermission() {\r\n        if (ContextCompat.checkSelfPermission(this.activity, Manifest.permission.CAMERA)\r\n                == PackageManager.PERMISSION_GRANTED) {\r\n            barcodeView.resume();\r\n        } else if(!askedPermission) {\r\n            ActivityCompat.requestPermissions(this.activity,\r\n                    new String[]{Manifest.permission.CAMERA},\r\n                    cameraPermissionReqCode);\r\n            askedPermission = true;\r\n        } else {\r\n            // Wait for permission result\r\n        }\r\n    }\r\n`\r\n\r\nIn my gradle;\r\nminSdkVersion 19\r\ntargetSdkVersion 23\r\nversionCode 22\r\n\r\ncompile 'com.android.support:support-v4:24.0.0'\r\n\r\nI use;\r\nzxing-android-embeded-3.2.0\r\n\r\nStack Trace\t\r\njava.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat;\r\nat com.journeyapps.barcodescanner.CaptureManager.openCameraWithPermission(CaptureManager.java:233)\r\n\r\nCannot resolve ContextCompat and ActivityCompat. My device is android 6.0.0. What should ı do for this error?"}}
{"actor":{"display_login":"WonderCsabo"}}