target-23環境でのYouTubeApiの組み込みメモ
下記の書き方をしてハマったのでメモ。
サンプルがNativeJavaで動くものが提供されていて
Android用のがないからみたい
> useLibrary 'org.apache.http.legacy'
がぶつかってしまっている
- 変更前
- build.gradle
android { useLibrary 'org.apache.http.legacy' } repositories { jCenter() } dependencies { compile 'com.google.apis:google-api-services-youtube:v3-rev172-1.22.0' compile 'com.google.api-client:google-api-client:1.22.0' compile 'com.google.http-client:google-http-client:1.22.0' compile 'com.google.http-client:google-http-client-gson:1.22.0' }
- 変更後
- build.gradle
dependencies { compile ('com.google.apis:google-api-services-youtube:v3-rev172-1.22.0'){ exclude module: 'httpclient' exclude module: 'httpcore' } compile ('com.google.api-client:google-api-client:1.22.0'){ exclude module: 'httpclient' exclude module: 'httpcore' } }