java.lang.RuntimeException:createContext 失败:

2023-12-24

我在用Emulator 7.1.1(Google Apis)。 完整的例外是

     E/AndroidRuntime: FATAL EXCEPTION: GLThread 309

 java.lang.RuntimeException: createContext failed: 12291
  at com.google.maps.api.android.lib6.gmm6.vector.bi.a(:com.google.android.gms.DynamiteModulesB:834)
  at com.google.maps.api.android.lib6.gmm6.vector.bj.f(:com.google.android.gms.DynamiteModulesB:20825)
  at com.google.maps.api.android.lib6.gmm6.vector.bj.run(:com.google.android.gms.DynamiteModulesB:881)

该代码运行良好samsung galaxy J5但没有致力于emulator。我在谷歌上搜索过,我的 2 个小时浪费在这个错误上,但仍然找不到解决方案。任何帮助将不胜感激。

My build.gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    dexOptions {
        javaMaxHeapSize "4g"
    }

    defaultConfig {
        applicationId "com.katariya.pomoc"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        renderscriptTargetApi 18
        renderscriptSupportModeEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    compile 'com.android.support:appcompat-v7:25.3.0'
    compile 'com.android.support:design:25.3.0'
    compile 'com.android.support:recyclerview-v7:25.3.0'
    compile 'com.google.android.gms:play-services-maps:10.2.1'
    compile 'com.google.android.gms:play-services-location:10.2.1'
    compile 'com.google.android.gms:play-services-gcm:10.2.1'
    compile 'com.google.firebase:firebase-core:10.2.1'
    compile 'com.google.firebase:firebase-messaging:10.2.1'
    compile 'com.squareup.picasso:picasso:2.5.0'
    compile 'com.android.support:support-v4:25.3.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'commons-io:commons-io:2.4'

}
apply plugin: 'com.google.gms.google-services'

我得到了它!

我进入模拟器本身的设置并更改OpenGL ES 渲染 from 基于主机自动检测(默认) to 桌面原生 OpenGL。之后我的应用程序开始完美运行。为了清晰起见,这是一个屏幕截图,希望这对将来的人有所帮助!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

java.lang.RuntimeException:createContext 失败: 的相关文章

随机推荐