调试应用程序正常运行,但发布应用程序正常运行吗?

时间:2020-08-06 17:22:27

标签: android firebase gradle build.gradle

我是否需要在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'
    
    

0 个答案:

没有答案