2016-01-22 2 views
0

привет Уважаемые разработчики Я использую ресурс git hub, и я реализован так же, как и есть, но я получаю некоторые ошибки в предупреждении здесь я делюсь своим журнальным котом. на самом деле я пытаюсь использовать поиск в моей юности app.And это мой код, где я получаю помочь github codejava.lang.NoClassDefFoundError: com.google.api.client.http.javanet.ConnectionFactory в android

01-22 11:11:38.126 11202-11202/com.projects.et.youtubeapp E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin. 
 
01-22 11:11:38.126 11202-11202/com.projects.et.youtubeapp E/GMPM: Scheduler not set. Not logging error/warn. 
 
01-22 11:11:38.151 11202-11223/com.projects.et.youtubeapp E/GMPM: Uploading is not possible. App measurement disabled 
 

 
Could not find class 'com.google.api.client.http.javanet.ConnectionFactory', referenced from method com.google.api.client.http.javanet.NetHttpTransport.<init> 
 
VFY: unable to resolve check-cast 7925 (Lcom/google/api/client/http/javanet/ConnectionFactory;) in Lcom/google/api/client/http/javanet/NetHttpTransport; 
 
VFY: unable to find class referenced in signature (Lcom/google/api/client/http/javanet/ConnectionFactory;) 
 
Could not find class 'com.google.api.client.http.javanet.DefaultConnectionFactory', referenced from method com.google.api.client.http.javanet.NetHttpTransport.<init> 
 
VFY: unable to resolve new-instance 7926 (Lcom/google/api/client/http/javanet/DefaultConnectionFactory;) in Lcom/google/api/client/http/javanet/NetHttpTransport; 
 
Could not find class 'com.google.api.client.http.javanet.DefaultConnectionFactory', referenced from method com.google.api.client.http.javanet.NetHttpTransport.<init> 
 
VFY: unable to resolve new-instance 7926 (Lcom/google/api/client/http/javanet/DefaultConnectionFactory;) in Lcom/google/api/client/http/javanet/NetHttpTransport; 
 
VFY: unable to find class referenced in signature (Lcom/google/api/client/http/javanet/NetHttpRequest;) 
 
VFY: unable to find class referenced in signature (Lcom/google/api/client/http/LowLevelHttpRequest;) 
 
VFY: unable to resolve static method 56789: Lcom/google/api/client/util/Preconditions;.checkArgument (ZLjava/lang/String;[Ljava/lang/Object;)V 
 
VFY: unable to find class referenced in signature (Lcom/google/api/client/http/HttpRequestFactory;) 
 
VFY: unable to find class referenced in signature (Lcom/google/api/client/http/HttpRequestFactory;) 
 
Could not find class 'com.google.api.client.http.HttpRequestFactory', referenced from method com.google.api.client.http.HttpTransport.createRequestFactory 
 
VFY: unable to resolve new-instance 7912 (Lcom/google/api/client/http/HttpRequestFactory;) in Lcom/google/api/client/http/HttpTransport; 
 
: java.lang.NoClassDefFoundError: com.google.api.client.http.javanet.ConnectionFactory 
 
:  at com.google.api.client.http.javanet.NetHttpTransport.<init>(NetHttpTransport.java:96) 
 
:  at com.projects.et.youtubeapp.connections.ServiceTask.loadVideos(ServiceTask.java:80) 
 
:  at com.projects.et.youtubeapp.connections.ServiceTask.doInBackground(ServiceTask.java:55) 
 
:  at com.projects.et.youtubeapp.connections.ServiceTask.doInBackground(ServiceTask.java:22) 
 
:  at android.os.AsyncTask$2.call(AsyncTask.java:287) 
 
:  at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
 
:  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 
 
:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
 
:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
 
:  at java.lang.Thread.run(Thread.java:841)

вот мой gradle.build где я добавил все требуемые последние зависимости для кода

dependencies { 
 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
 
    testCompile 'junit:junit:4.12' 
 
    compile 'com.android.support:appcompat-v7:23.1.1' 
 
    compile 'com.android.support:design:23.1.1' 
 
    compile 'com.google.android.gms:play-services:8.4.0' 
 
    compile 'com.google.apis:google-api-services-youtube:v3-rev120-1.19.0' 
 
    compile 'com.squareup.picasso:picasso:2.3.2' 
 
    compile 'com.android.support:cardview-v7:23.1.1' 
 
    compile 'com.google.api-client:google-api-client-gson:1.21.0' 
 
    compile 'com.google.api-client:google-api-client-android:1.21.0' 
 
    compile 'com.google.http-client:google-http-client-android:1.21.0' 
 
}

любая помощь относительно моей проблемы будут хорошо оценены и спасибо заранее

ответ

0

Добавить

compile 'com.google.api.client:google-api-client:1.4.0-alpha' 
+0

я должен удалить другие зависимости или оставаться их как это d добавить это? – Junaid

+0

, если требуются другие зависимости, сохраните его или удалите другие зависимости com.google.api –

+0

Сэр такая же ошибка для этого кода – Junaid

Смежные вопросы