简体   繁体   English

appcompat活动崩溃api 28

[英]appcompat activity crash api 28

today i ran into a rare problem. 今天我遇到了一个罕见的问题。 we have an app which is working for some time on many devices. 我们有一个可以在许多设备上运行一段时间的应用程序。 yesterday we had a feedback from one of our users who says our app crashes at launch on his device. 昨天,我们收到了一位用户的反馈,该用户称我们的应用在其设备上启动时崩溃。 after some time i found he is using android 9 so i downloaded android 9 on my Genymotion,surprised that the app crashes! 一段时间后,我发现他正在使用android 9,因此我在Genymotion上下载了android 9,这使该应用程序崩溃了! it shows activity for like 2 seconds and it disappear! 它显示活动大约2秒钟,然后消失!

here is my complete log cat: 这是我完整的日志猫:

>     01-22 10:29:09.569 8154-8154/? I/Zygote: seccomp disabled by setenforce 0 01-22 10:29:09.571 8154-8154/? I/app.yarbax.com:
> Late-enabling -Xcheck:jni 01-22 10:29:09.638 8154-8154/?
> W/app.yarbax.com: Unexpected CPU variant for X86 using defaults: x86
> 01-22 10:29:10.473 8154-8154/app.yarbax.com W/app.yarbax.com: JIT
> profile information will not be recorded: profile file does not exits.
> 01-22 10:29:10.476 8154-8154/app.yarbax.com I/chatty:
> uid=10072(app.yarbax.com) identical 9 lines 01-22 10:29:10.477
> 8154-8154/app.yarbax.com W/app.yarbax.com: JIT profile information
> will not be recorded: profile file does not exits. 01-22 10:29:10.539
> 8154-8154/app.yarbax.com I/InstantRun: starting instant run server: is
> main process 01-22 10:29:10.586 8154-8172/app.yarbax.com D/libEGL:
> Emulator has host GPU support, qemu.gles is set to 1. 01-22
> 10:29:10.580 8154-8154/app.yarbax.com I/app.yarbax.com: type=1400
> audit(0.0:1318): avc: denied { connectto } for comm=45474C20496E6974
> path="/dev/socket/property_service"
> scontext=u:r:untrusted_app:s0:c72,c256,c512,c768 tcontext=u:r:init:s0
> tclass=unix_stream_socket permissive=1 01-22 10:29:10.615
> 8154-8172/app.yarbax.com D/vndksupport: Loading
> /vendor/lib/egl/libGLES_emulation.so from current namespace instead of
> sphal namespace. 01-22 10:29:10.622 8154-8172/app.yarbax.com E/libEGL:
> load_driver(/vendor/lib/egl/libGLES_emulation.so): dlopen failed:
> library "/vendor/lib/egl/libGLES_emulation.so" not found 01-22
> 10:29:10.622 8154-8172/app.yarbax.com D/vndksupport: Loading
> /vendor/lib/egl/libEGL_emulation.so from current namespace instead of
> sphal namespace. 01-22 10:29:10.678 8154-8172/app.yarbax.com D/libEGL:
> loaded /vendor/lib/egl/libEGL_emulation.so 01-22 10:29:10.685
> 8154-8172/app.yarbax.com D/vndksupport: Loading
> /vendor/lib/egl/libGLESv1_CM_emulation.so from current namespace
> instead of sphal namespace. 01-22 10:29:10.686
> 8154-8172/app.yarbax.com D/libEGL: loaded
> /vendor/lib/egl/libGLESv1_CM_emulation.so 01-22 10:29:10.743
> 8154-8172/app.yarbax.com D/vndksupport: Loading
> /vendor/lib/egl/libGLESv2_emulation.so from current namespace instead
> of sphal namespace. 01-22 10:29:10.846 8154-8172/app.yarbax.com
> D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so 01-22
> 10:29:11.430 8154-8154/app.yarbax.com W/ActivityThread:
> handleWindowVisibility: no activity for token
> android.os.BinderProxy@da73b1f 01-22 10:29:11.722
> 8154-8154/app.yarbax.com W/app.yarbax.com: Accessing hidden method
> Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
> (light greylist, reflection) 01-22 10:29:11.723
> 8154-8154/app.yarbax.com W/app.yarbax.com: Accessing hidden method
> Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light
> greylist, reflection) 01-22 10:29:11.973 8154-8154/app.yarbax.com
> D/OpenGLRenderer: HWUI GL Pipeline 01-22 10:29:12.136
> 8154-8154/app.yarbax.com I/RenderThread: type=1400 audit(0.0:1322):
> avc: denied { connectto } for path=006C6F63616C5F6F70656E676C
> scontext=u:r:untrusted_app:s0:c72,c256,c512,c768
> tcontext=u:r:local_opengl:s0 tclass=unix_stream_socket permissive=1
>                                                             
>                                                             [ 01-22 10:29:12.139  8154: 8193 D/         ]
>                                                             HostConnection::get() New Host Connection established 0xddde8780, tid
> 8193 01-22 10:29:12.351 8154-8165/app.yarbax.com I/app.yarbax.com:
> Background concurrent copying GC freed 8593(2MB) AllocSpace objects,
> 4(76KB) LOS objects, 51% free, 1462KB/2MB, paused 779us total
> 159.736ms 01-22 10:29:12.416 8154-8193/app.yarbax.com I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay
> retrieved: 0 01-22 10:29:12.417 8154-8193/app.yarbax.com
> I/ConfigStore:
> android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay
> retrieved: 0 01-22 10:29:12.417 8154-8193/app.yarbax.com
> I/OpenGLRenderer: Initialized EGL, version 1.4 01-22 10:29:12.417
> 8154-8193/app.yarbax.com D/OpenGLRenderer: Swap behavior 1 01-22
> 10:29:12.447 8154-8193/app.yarbax.com D/EGL_emulation:
> eglCreateContext: 0xdfc052a0: maj 2 min 0 rcv 2 01-22 10:29:12.756
> 8154-8193/app.yarbax.com D/vndksupport: Loading
> /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from
> current namespace instead of sphal namespace. 01-22 10:29:12.757
> 8154-8193/app.yarbax.com D/vndksupport: Loading
> /vendor/lib/hw/gralloc.vbox86.so from current namespace instead of
> sphal namespace. 01-22 10:29:12.764 8154-8193/app.yarbax.com
> E/EGL_emulation: tid 8193: eglSurfaceAttrib(1354): error 0x3009
> (EGL_BAD_MATCH) 01-22 10:29:12.764 8154-8193/app.yarbax.com
> W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface
> 0xdfc055a0, error=EGL_BAD_MATCH 01-22 10:29:14.811
> 8154-8193/app.yarbax.com I/OpenGLRenderer: Davey! duration=2712ms;
> Flags=0, IntendedVsync=4492063682638, Vsync=4492163682634,
> OldestInputEvent=9223372036854775807, NewestInputEvent=0,
> HandleInputStart=4492167660692, AnimationStart=4492169595648,
> PerformTraversalsStart=4492169998418, DrawStart=4492764972455,
> SyncQueued=4492821116533, SyncStart=4492856457248,
> IssueDrawCommandsStart=4492888890180, SwapBuffers=4494704179105,
> FrameCompleted=4494811078552, DequeueBufferDuration=76000,
> QueueBufferDuration=562000,  01-22 10:29:14.825
> 8154-8154/app.yarbax.com I/Choreographer: Skipped 158 frames!  The
> application may be doing too much work on its main thread. 01-22
> 10:29:14.951 8154-8154/app.yarbax.com V/StudioProfiler:
> StudioProfilers agent attached. 01-22 10:29:15.143
> 8154-8230/app.yarbax.com V/StudioProfiler: Acquiring Application for
> Events 01-22 10:29:15.482 8154-8193/app.yarbax.com I/OpenGLRenderer:
> Davey! duration=3298ms; Flags=0, IntendedVsync=4492184195735,
> Vsync=4494817528963, OldestInputEvent=9223372036854775807,
> NewestInputEvent=0, HandleInputStart=4494825185499,
> AnimationStart=4494825251715, PerformTraversalsStart=4494825688057,
> DrawStart=4494886564207, SyncQueued=4494889170892,
> SyncStart=4494889271810, IssueDrawCommandsStart=4494889389381,
> SwapBuffers=4495407091147, FrameCompleted=4495482426839,
> DequeueBufferDuration=202000, QueueBufferDuration=332000,  01-22
> 10:29:15.540 8154-8154/app.yarbax.com A/libc: Fatal signal 6
> (SIGABRT), code -6 (SI_TKILL) in tid 8154 (app.yarbax.com), pid 8154
> (app.yarbax.com)

here is my activity layout: 这是我的活动布局:

    <?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:background="#f7f8f8"
    android:layoutDirection="rtl"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:background="#d5d7d7"
            android:padding="5dp"
            android:layout_gravity="center"
            android:gravity="center">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="درباره ی ما"
                android:padding="15dp"
                android:textColor="@android:color/black"
                android:textSize="@dimen/header_text_size"
                android:layout_gravity="center"
                android:gravity="center"/>
        </LinearLayout>
        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="100dp"
                        android:layout_height="100dp"
                        android:layout_gravity="center"
                        android:src="@mipmap/appicon"
                        android:layout_margin="10dp"/>
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:paddingLeft="30dp"
                        android:paddingRight="10dp"
                        android:textAlignment="viewStart"
                        android:textStyle="bold"
                        android:gravity="center"
                        android:layout_gravity="center"
                        android:lineSpacingExtra="5dp"
                        android:textSize="22sp"
                        android:layout_marginBottom="10dp"
                        android:text="درباره ی ما بیشتر بدانید"
                        android:textColor="@color/colorPrimaryDark"/>
                </LinearLayout>
                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:paddingRight="20dp"
                    android:gravity="right"
                    android:layout_gravity="center"
                    android:lineSpacingExtra="8dp"
                    android:textSize="14sp"
                    android:autoText="true"
                    android:text="@string/aboutus_text"
                    android:textColor="#000000"/>

                <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="50dp"
                    android:layout_gravity="center">
                    <ImageView
                        android:layout_width="250dp"
                        android:layout_height="125dp"
                        android:background="@mipmap/aboutus_logo"/>
                    <ImageView
                        android:src="@drawable/images_corner"
                        android:layout_width="250dp"
                        android:layout_height="125dp" />

                </FrameLayout>

            </LinearLayout>
        </ScrollView>

    </LinearLayout>


</FrameLayout>

her is my activity class: 她是我的活动班:

    package app.yarbax.com;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by shayanrhm on 1/1/19.
 */

public class AboutUs extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedinstance){
        super.onCreate(savedinstance);
        setContentView(R.layout.aboutus);
    }
    @Override
    public void onBackPressed(){
        super.onBackPressed();
        finish();
    }
}

and here is my build.gradle file: 这是我的build.gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    defaultConfig {
        applicationId "app.yarbax.com"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 23
        versionName "2.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.cedarmaps:CedarMapsSDK:3.1.2'
    compile 'com.google.code.gson:gson:2.8.5'
    compile 'com.baoyz.actionsheet:library:1.1.7'
    compile 'com.squareup.okhttp3:okhttp:3.12.0'
    api 'com.cedarmaps:mapbox-android-sdk:6.8.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    compile 'com.github.zcweng:switch-button:0.0.3@aar'
    //noinspection GradleCompatible
    compile 'com.google.android.gms:play-services-maps:16.0.0'
}
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '26.0.0'
            }
        }
    }
}

i wonder if any one had same issue and have a solution for this. 我想知道是否有人有同样的问题,并对此有解决方案。

thanks in advance 提前致谢

万一有人遇到相同的问题,则Google应用程序使用API​​ 28(Android 9.0; PIE)会出现问题,对其进行更新,它将消失。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android 6.0 API 23上的应用程序崩溃(但Android 9 API 28上没有) - App crash on Android 6.0 API 23 (but not on Android 9, API 28) android studio和最新sdk版本的API级别为28,appcompat-v7文件夹中的API级别为26.0.0-alpha1 - API level of 28 in android studio and latest sdk-version is 26.0.0-alpha1 in appcompat-v7 folder 尝试建立gradle时发生错误-androidx.appcompat:appcompat:28. + - error on trying to build gradle - androidx.appcompat:appcompat:28.+ appcompat 和片段在一个活动中 - appcompat and fragment in one activity 定制主题android崩溃原因:java.lang.IllegalStateException:您需要在此活动中使用Theme.AppCompat主题(或后代) - Crash with custom theme android Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity 当应用程序在 Android api 28(饼图)中处于前台或后台时,单击通知“启动活动”时的附加信息为 null - on click of notification "launching activity" has extras as null, when app is in foreground or back ground in Android api 28 (pie) 工具栏图标未出现在AppCompat活动中 - Toolbar icons not appearing in AppCompat Activity 引用位于Appcompat活动片段中的Recyclerview? - Reference a Recyclerview that was in a fragment in Appcompat activity? 为什么activity_main.xml在Android Studio中不显示我的组件,为什么28个API不起作用? - Why doesn't activity_main.xml show my components in Android Studio, and why does 28 API not work? Android 9 Api 28 通知未显示 - Android 9 Api 28 Notification not showing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM