Отладка приложения работает, но выпуск приложения не работает? - PullRequest
0 голосов
/ 06 августа 2020

Есть ли какие-либо изменения, которые я хочу сделать в файле gradle, чтобы приложение выпуска правильно работало. Недавно я перешел с обычного приложения на androidx. Когда я отлаживаю приложение и запускаю его на своем телефоне, оно работает правильно, но когда я установил приложение выпуска, оно не работает, как это исправить? Когда я переместил свое приложение в android -x, он попросил меня изменить setShiftingMode (false) на setShifting (false), проблема возникла из-за этого или нет. Как я могу исправить указанную выше проблему?

 buildscript {
        repositories {
            maven { url 'https://plugins.gradle.org/m2/'}
        }
    
        dependencies {
            classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.8, 0.99.99]'
        }
    }
    apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 29
    
        defaultConfig {
            applicationId "com.example.demo"
    
            manifestPlaceholders = [onesignal_app_id               : "fa5f9ac7-sdfdf-dfdf-exampleid-6f",
                                    // Project number pulled from dashboard, local value is ignored.
                                    onesignal_google_project_number: "REMOTE"]
            minSdkVersion 19
            targetSdkVersion 29
            versionCode 5
            versionName "5.1.11"
            testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
            multiDexEnabled true
        }
        android {
            lintOptions {
                checkReleaseBuilds false
                // Or, if you prefer, you can continue to check for errors in release builds,
                // but continue the build even when errors are found:
                abortOnError false
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
       }
    
        buildTypes {
            release {
                debuggable false
                shrinkResources true
                minifyEnabled true
                useProguard true
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    
    }
    
    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'androidx.appcompat:appcompat:1.0.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        implementation 'com.squareup.retrofit2:retrofit:2.4.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
        implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
        implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
        implementation 'com.google.android.material:material:1.0.0'
        implementation 'androidx.cardview:cardview:1.0.0'
        implementation 'com.github.bumptech.glide:glide:3.7.0'
        implementation 'com.jakewharton:butterknife:10.0.0'
        annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
        implementation 'com.github.clans:fab:1.6.4'
        implementation 'com.devbrackets.android:exomedia:4.2.1'
        implementation 'com.daimajia.numberprogressbar:library:1.4@aar'
        debugImplementation 'com.amitshekhar.android:debug-db:1.0.3'
        implementation 'com.miguelcatalan:materialsearchview:1.4.0'
        implementation project(':library')
        implementation('com.github.afollestad.material-dialogs:core:0.8.5.1@aar') {
            transitive = true
        }
        implementation 'org.jsoup:jsoup:1.11.1'
        implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.1'
        implementation 'com.onesignal:OneSignal:[3.15.0, 3.99.99]'
        implementation 'com.google.android.gms:play-services-ads:19.3.0'
        implementation 'com.google.firebase:firebase-core:17.4.4'
        implementation 'com.loopj.android:android-async-http:1.4.9'
        implementation 'io.branch.sdk.android:library:2.+'
        implementation project(':jiaozivideoplayer')
    }
    apply plugin: 'com.google.gms.google-services'
    apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
    
    
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...