Android应用程序在android 5.0上运行但是android 4.2.1 java.lang.NoClassDefFoundError:com.google.firebase.FirebaseOptions

时间:2016-06-15 07:30:49

标签: android android-studio firebase runtime-error

你好我正在android studio上开发一个android应用程序

我的程序适用于android 5.0 - 6.0

但是当我尝试使用android 4.2或4.4时,它会给我

<script src="https://autodeskviewer.com/viewers/2.5/viewer3D.min.js"></script>

我该如何解决这个错误

2 个答案:

答案 0 :(得分:0)

看起来可能重复:

你可以试试以下事情:

  • 将您的Google Play服务更新为最新版本。
  • 为您的应用添加multiDex支持。检查链接。

Getting Exception java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase

答案 1 :(得分:0)

我解决了它

remove 
compile 'com.google.android.gms:play-services:9.0.0'  

from My Build.gradle  then add google elements 1 by 1 


  //compile 'com.google.android.gms:play-services:9.0.2'   remove this
    compile 'com.google.android.gms:play-services-base:9.0.2'
    compile 'com.google.android.gms:play-services-identity:9.0.2'
    compile 'com.google.android.gms:play-services-appindexing:9.0.2'
    compile 'com.google.android.gms:play-services-appinvite:9.0.2'
    compile 'com.google.android.gms:play-services-plus:9.0.2'
    compile 'com.google.android.gms:play-services-auth:9.0.2'
    compile 'com.google.android.gms:play-services-analytics:9.0.2'
    compile 'com.google.android.gms:play-services-gcm:9.0.2'
    compile 'com.google.android.gms:play-services-maps:9.0.2'
    compile 'com.google.android.gms:play-services-drive:9.0.2'
    compile 'com.google.android.gms:play-services-panorama:9.0.2'

然后我的应用程序适用于4. ,5。和6. Android版本

相关问题