模拟器无法加载“ libGLES_emulation”驱动程序

时间:2019-09-08 03:05:30

标签: android android-studio android-intent

我正在使用Google's guide设置FirebaseUI的过程中,但是突然出现一个错误,似乎找不到解决方法。我很确定这与我的gradle有关,因为我尝试使用手机而不是AVD注释Java文件中的更改,而其他模拟器则无济于事。我已经包括了在“运行”控制台中得到的清单,清单和渐变。如果您需要更多信息,请告诉我。谢谢!


编辑:对于那些存在相同问题的人,我认为我已通过在API Q模拟器上更新Google Play服务(您必须先登录Google Play)进行了修复,然后将以下内容添加至该应用级gradle:

android {
     ...
     compileOptions {
         ...
         sourceCompatibility = 1.8
         targetCompatibility = 1.8
         ...
     }
     ...
}

我不知道它是如何工作的,但我希望它也对您有用。


运行(仅发生冲突)

...
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
...
W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
E/vndksupport: Could not load /vendor/lib/egl/libGLES_emulation.so from sphal namespace: dlopen failed: library "/vendor/lib/egl/libGLES_emulation.so" not found.
E/libEGL: load_driver(/vendor/lib/egl/libGLES_emulation.so): unknown
W/RenderThread: type=1400 audit(0.0:4480): avc: denied { write } for name="property_service" dev="tmpfs" ino=8377 scontext=u:r:untrusted_app_27:s0:c119,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
...
W/xample.litloca: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection)
    Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection)
...
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
...
W/Gralloc3: mapper 3.x is not supported

运行(完整)

09/07 19:52:53: Launching 'app' on Pixel 2 API Q.
$ adb shell am start -n "com.example.litlocal/com.example.litlocal.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Waiting for process to come online...
Connected to process 14608 on device 'Pixel_2_API_Q [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/xample.litloca: The ClassLoaderContext is a special shared library.
I/xample.litloca: The ClassLoaderContext is a special shared library.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
V/FA: Registered activity lifecycle callback
I/FirebaseInitProvider: FirebaseApp initialization successful
D/OpenGLRenderer: Skia GL Pipeline
D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
E/vndksupport: Could not load /vendor/lib/egl/libGLES_emulation.so from sphal namespace: dlopen failed: library "/vendor/lib/egl/libGLES_emulation.so" not found.
E/libEGL: load_driver(/vendor/lib/egl/libGLES_emulation.so): unknown
D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
W/RenderThread: type=1400 audit(0.0:4449): avc: denied { write } for name="property_service" dev="tmpfs" ino=8377 scontext=u:r:untrusted_app_27:s0:c119,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
V/FA: onActivityCreated
W/xample.litloca: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection)
W/xample.litloca: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection)
D/: HostConnection::get() New Host Connection established 0xdc721500, tid 14666
D/: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_host_composition_v1 GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation: eglCreateContext: 0xdc7124e0: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xdc7124e0: ver 3 0 (tinfo 0xdc708f60)
V/FA: Collection enabled
V/FA: App package, google app id: com.example.litlocal, 1:175514927228:android:47ec351c4609ff5c6609f9
W/Gralloc3: mapper 3.x is not supported
I/FA: App measurement is starting up, version: 18202
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.example.litlocal
D/FA: Debug-level message logging enabled
D/: createUnique: call
D/: HostConnection::get() New Host Connection established 0xdc721640, tid 14666
D/: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_host_composition_v1 GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
D/EGL_emulation: eglMakeCurrent: 0xdc7124e0: ver 3 0 (tinfo 0xdc708f60)
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 0
I/xample.litloca: Background young concurrent copying GC freed 16987(4410KB) AllocSpace objects, 8(224KB) LOS objects, 78% free, 1696KB/7840KB, paused 6.401ms total 59.038ms
V/FA: Connecting to remote service
V/FA: Detected application was in foreground
V/FA: Session started, time: 27900964
D/FA: Setting user property (FE): _sid, 1567911177
V/FA: Connection attempt already in progress
I/FA: Tag Manager is not found and thus will not be used
D/FA: Logging event (FE): session_start(_s), Bundle[{ga_event_origin(_o)=auto, ga_session_id(_sid)=1567911177}]
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 27900309
D/FA: Logging event (FE): screen_view(_vs), Bundle[{ga_event_origin(_o)=auto, ga_screen_class(_sc)=MainActivity, ga_screen_id(_si)=8377598752693967695}]
V/FA: Connection attempt already in progress
    Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 6
V/FA: Inactivity, disconnecting from the service

清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.litlocal">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity
            android:name=".MainActivity"
            android:label="LitLocal">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".CreateEventActivity"
            android:label="@string/create_event_activity_name"/>

        <activity
            android:name=".SetEventLocationActivity"
            android:label="@string/set_event_location_activity_name"/>

        <activity
            android:name=".LoginActivity"
            android:label="@string/login_activity_name"/>

    </application>

</manifest>

成绩(项目)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'com.google.gms:google-services:4.3.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

成绩(应用)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.litlocal"
        minSdkVersion 22
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        resConfigs "en"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        /*sourceCompatibility = 1.8
        targetCompatibility = 1.8*/
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.2.1'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v8:0.9.0'

    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    implementation 'com.google.firebase:firebase-auth:19.0.0'
    implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
    implementation 'com.google.firebase:firebase-firestore:21.0.0'
    //implementation 'com.firebaseui:firebase-ui-database:5.1.0'

    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    // Tentative for login
    //implementation 'com.squareup.picasso:picasso:2.71828'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

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

1 个答案:

答案 0 :(得分:0)

这对我有用:

android {
     ...
     compileOptions {
         ...
         sourceCompatibility = 1.8
         targetCompatibility = 1.8
         ...
     }
     ...
}