Код работает нормально на эмуляторе, но вылетает на устройстве с тем же API - PullRequest
0 голосов
/ 05 июня 2019

Я собрал свое приложение с минимальным 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)
'''
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...