Why is my APK name generic?

前端 未结 2 716
感动是毒
感动是毒 2021-01-03 01:36

I\'m sure this is the dumb question of the day, but here it goes... I have an app that I need to distribute \"in house\" to be used by sales at a trade show. I successfull

相关标签:
2条回答
  • 2021-01-03 01:59

    May be it is too late to answer but i was having same problem to show my app name with the apk generated. i just update the defaultConfig in build.gradle(Module:app) as following

    defaultConfig {
            applicationId "com.test.testapp"
            minSdkVersion 19
            targetSdkVersion 26
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            setProperty("archivesBaseName", "TestApp")
        }
    

    This works by modifying the archivesBaseName property and works for Gradle Version >= 2.0, last tested with gradle-3.3-all. Output would be TestApp-debug.apk instead of app-debug.apk

    0 讨论(0)
  • 2021-01-03 02:03

    Yes, it uses the folder name of your application's module. If you rename the folder, you also need to update your settings.gradle file with the updated name; the refactoring doesn't automatically change it there.

    After you change settings.gradle, make sure you re-sync your project with the Gradle files. It should put a banner at the top of your editor windows reminding you that you need to do it; if you don't, then click the button in the toolbar.

    0 讨论(0)
提交回复
热议问题