将android studio升级到2.2 Beta时出现错误
java.lang.VerifyError:com / google / android / gms / maps / SupportMapFragment
LogCat文件
I/dalvikvm: Could not find method com.google.android.gms.common.internal.zzx.zzbd, referenced from method com.google.android.gms.maps.SupportMapFragment.getMapAsync
W/dalvikvm: VFY: unable to resolve static method 21997: Lcom/google/android/gms/common/internal/zzx;.zzbd (Ljava/lang/String;)V
W/dalvikvm: VFY: rejecting opcode 0x71 at 0x0002
W/dalvikvm: VFY: rejected Lcom/google/android/gms/maps/SupportMapFragment;.getMapAsync (Lcom/google/android/gms/maps/OnMapReadyCallback;)V
W/dalvikvm: Verifier rejected class Lcom/google/android/gms/maps/SupportMapFragment;
W/dalvikvm: Class init failed in newInstance call (Lcom/google/android/gms/maps/SupportMapFragment;)
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x415bfba8)
D/MtaSDK: [main(1): null:-1] - MTA has caught the following uncaught exception:
E/MtaSDK: java.lang.VerifyError: com/google/android/gms/maps/SupportMapFragment
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.support.v4.app.Fragment.instantiate(Fragment.java:423)
at android.support.v4.app.Fragment.instantiate(Fragment.java:398)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2224)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.abc.efg.ContactUsFragment.onCreateView(ContactUsFragment.java:85)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1016)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1197)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1562)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:535)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1106)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:552)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:514)
at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:506)
at com.abc.efg.MainBottomTabLayout$TabClickListener.onClick(MainBottomTabLayout.java:233)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
I/MID: read mid from InternalStorage
I/MID: read mid from InternalStorage:xjgC8TAYnEMw2RGF2pxK6HCXIo1ttTiyUj9Y5VaA3PA7J0o5iOGL1Lw9TiTtXTRCT1s7nbZGRlZqQnBK+VzSZgIagrdi6cXSXqShQSfxsOkj8/IUdtBgWEwxpyMcQxF7Yx0rhPOQlL4MM1xowUaKZ2WjIQo=
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.abc.efg, PID: 11576
java.lang.VerifyError: com/google/android/gms/maps/SupportMapFragment
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.support.v4.app.Fragment.instantiate(Fragment.java:423)
at android.support.v4.app.Fragment.instantiate(Fragment.java:398)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2224)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.abc.efg.ContactUsFragment.onCreateView(ContactUsFragment.java:85)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1016)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1197)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1562)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:535)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1106)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:552)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:514)
at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:506)
at com.abc.efg.MainBottomTabLayout$TabClickListener.onClick(MainBottomTabLayout.java:233)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
更新:
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.2"
defaultConfig {
applicationId
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/libs'] } }
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/gson-2.2.4.jar')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:support-v4:22.0.0'
compile 'com.avast:android-styled-dialogs:2.2.0'
compile 'com.google.android.gms:play-services-maps:7.0.0'
compile 'com.onesignal:OneSignal:3.+@aar'
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.google.android.gms:play-services-location:+'
compile 'com.loopj.android:android-async-http:1.4.5'
compile 'com.github.johnkil.android-progressfragment:progressfragment:1.4.+'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'info.hoang8f:android-segmented:1.0.6'
compile project(':ViewPagerIndicator-library')
compile files('libs/android-smart-image-view-1.0.0.jar')
compile files('libs/jsoup-1.8.2.jar')
compile files('libs/libammsdk.jar')
}
但升级Android Studio之前一切正常。请帮忙。