2016-02-25 5 views
1

Я использую Google службы GradleAndroid студии обновления Gradle ошибка

compile 'com.google.android.gms:play-services:8.1.0' 
=> Bitmap bitmap = BitmapFactory.decodeFile(imagePath); // return bitmap 

, когда я обновить его до

compile 'com.google.android.gms:play-services-ads:8.4.0' 
=> Bitmap bitmap = BitmapFactory.decodeFile(imagePath); // return null ??!! 

Почему это произошло? и какое решение?

+0

Не знаю. Возможно, возникла ошибка. Что относительно 'compile 'com.google.android.gms: play-services-ads: 8.3.0''? –

+0

попробуйте это 'com.google.android.gms: play-services: 8.4.0' – AKSiddique

+0

Когда я использую com.google.android.gms: play-services: 8.4.0 У меня есть эта проблема http: // stackoverflow .com/questions/34400059/android-studio-gradle-org-gradle-process-internal-execexception –

ответ

0
i am using same gradle 
compile 'com.google.android.gms:play-services-ads:8.4.0' 
i am sure issue is with your file path 
check below code for testing put an image test.jpg in your DCIM folder and run this code 
ImageView imageView = (ImageView) view.findViewById(R.id.imageView); 
      String imageInSD = "/sdcard/DCIM/test.jpg";    
      Bitmap bitmap = BitmapFactory.decodeFile(imageInSD); 
      if(bitmap == null){ 
       Toast.makeText(getActivity(),"not found",Toast.LENGTH_SHORT).show(); 
      } 
      else { 
       Toast.makeText(getActivity(),"found",Toast.LENGTH_SHORT).show(); 
       imageView.setImageBitmap(bitmap); 
      } 
+0

Спасибо, но когда я обновляю компиляцию 'com.google.android.gms: play-services: 8.1.0' в 8.4 .0 У меня есть эта проблема http://stackoverflow.com/questions/34400059/android-studio-gradle-org-gradle-process-internal-execeception –

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