代码在模拟器上工作正常,但在使用相同api的设备上崩溃

时间:2019-06-05 06:43:17

标签: java android gradle

我构建的应用程序的最低SDK为24,而我在设备上使用的版本为26。在具有完全相同的API的仿真器上,它可以很好地运行,但是当我在设备上安装APK时,只是说“应用程序不断停止”。我的摇篮中有什么我想念的吗?预先感谢。

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.damoproductionsandroid.freefall"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        lintOptions {
            checkReleaseBuilds false

        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets { main { java.srcDirs = ['src/main/java', 'src/main/java/Upgrades'] } }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
'''


'''Logcat
2019-06-05 18:18:26.772 22212-22212/? I/art: Not late-enabling -Xcheck:jni (already on)
2019-06-05 18:18:26.772 22212-22212/? W/art: Unexpected CPU variant for X86 using defaults: x86
2019-06-05 18:18:26.922 22212-22212/com.damoproductionsandroid.freefall I/InstantRun: starting instant run server: is main process
2019-06-05 18:18:26.933 22212-22212/com.damoproductionsandroid.freefall I/art: Starting a blocking GC Explicit
2019-06-05 18:18:26.953 22212-22212/com.damoproductionsandroid.freefall I/art: Explicit concurrent mark sweep GC freed 18651(801KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 4MB/6MB, paused 1.172ms total 19.151ms
2019-06-05 18:18:27.019 22212-22242/com.damoproductionsandroid.freefall V/StudioProfiler: Acquiring Application for Events
2019-06-05 18:18:27.332 22212-22246/com.damoproductionsandroid.freefall I/OpenGLRenderer: Initialized EGL, version 1.4
2019-06-05 18:18:27.332 22212-22246/com.damoproductionsandroid.freefall D/OpenGLRenderer: Swap behavior 1
2019-06-05 18:18:27.332 22212-22246/com.damoproductionsandroid.freefall W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2019-06-05 18:18:27.332 22212-22246/com.damoproductionsandroid.freefall D/OpenGLRenderer: Swap behavior 0
2019-06-05 18:18:27.387 22212-22246/com.damoproductionsandroid.freefall D/EGL_emulation: eglCreateContext: 0xa7f85480: maj 2 min 0 rcv 2
2019-06-05 18:18:27.426 22212-22246/com.damoproductionsandroid.freefall D/EGL_emulation: eglMakeCurrent: 0xa7f85480: ver 2 0 (tinfo 0xa7f837e0)
2019-06-05 18:18:27.448 22212-22246/com.damoproductionsandroid.freefall D/EGL_emulation: eglMakeCurrent: 0xa7f85480: ver 2 0 (tinfo 0xa7f837e0)
'''

0 个答案:

没有答案