{"action":"closed","issue":{"url":"https://api.github.com/repos/wequick/Small/issues/45","repository_url":"https://api.github.com/repos/wequick/Small","labels_url":"https://api.github.com/repos/wequick/Small/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/wequick/Small/issues/45/comments","events_url":"https://api.github.com/repos/wequick/Small/issues/45/events","html_url":"https://github.com/wequick/Small/issues/45","id":136259030,"number":45,"title":"测试多渠道打包出现错误","user":{"login":"dxiaogang","id":10472084,"avatar_url":"https://avatars.githubusercontent.com/u/10472084?v=3","gravatar_id":"","url":"https://api.github.com/users/dxiaogang","html_url":"https://github.com/dxiaogang","followers_url":"https://api.github.com/users/dxiaogang/followers","following_url":"https://api.github.com/users/dxiaogang/following{/other_user}","gists_url":"https://api.github.com/users/dxiaogang/gists{/gist_id}","starred_url":"https://api.github.com/users/dxiaogang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dxiaogang/subscriptions","organizations_url":"https://api.github.com/users/dxiaogang/orgs","repos_url":"https://api.github.com/users/dxiaogang/repos","events_url":"https://api.github.com/users/dxiaogang/events{/privacy}","received_events_url":"https://api.github.com/users/dxiaogang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-25T02:47:31Z","updated_at":"2016-02-25T08:46:44Z","closed_at":"2016-02-25T08:46:44Z","body":"操作如下:在原有Sample 工程的gradle配置添加多渠道相关配置:\r\n添加占位:\r\n  <meta-data\r\n            android:name=\"UMENG_CHANNEL\"\r\n            android:value=\"${UMENG_CHANNEL_VALUE}\"/>\r\n\r\nmanifestPlaceholders = [UMENG_CHANNEL_VALUE: \"umeng\"]\r\n\r\n添加渠道配置:\r\n// 渠道配置\r\n    productFlavors {\r\n        baidu {}\r\n        qihu360 {}\r\n    }\r\n\r\n    productFlavors.all {\r\n        flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]\r\n    }\r\n\r\n添加APK输出: \r\napplicationVariants.all { variant ->\r\n                variant.outputs.each { output ->\r\n                    def outputFile = output.outputFile\r\n                    if (outputFile != null && outputFile.name.endsWith('.apk')) {\r\n                        def fileName = \"TestSample${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk\"\r\n                        output.outputFile = new File(outputFile.parent, fileName)\r\n                    }\r\n                }\r\n            }\r\n\r\n执行 ./gradlew buildLib -q\r\n\r\n出现错误:\r\n* What went wrong:\r\nCould not determine the dependencies of task ':app:buildLib'.\r\n> Task with path 'jarReleaseClasses' not found in project ':app'.\r\n"}}