【问题标题】:Which file load first in android studio while run the application运行应用程序时,哪个文件首先在 android studio 中加载
【发布时间】:2016-07-23 12:01:10
【问题描述】:

我有一个愚蠢的令人困惑的问题,在 eclipse 中,在运行 android 应用程序时首先加载清单文件。

但在 android studio 项目中,哪个文件先加载,哪个文件加载出来,

        - build.gradle  file  or

        - Manifest file ?

上面哪个是第一个?

因为build.gradle文件也包含,

        - compileSdkVersion 
        - buildToolsVersion    and default config having following,


        - applicationId 
        - minSdkVersion 
        - targetSdkVersion
        - versionCode 
        - versionName 

谢谢。

【问题讨论】:

  • Android Studio 是 IDE,不会从清单中调用任何内容。 Android 可以。
  • 我理解您的问题,如果您使用 gradle 构建您的应用程序,那么您在清单中的设置将被忽略

标签: android android-studio android-manifest build.gradle


【解决方案1】:

这是 Android 官方对此的说法: https://developer.android.com/studio/run/index.html

还有一些进一步的阅读:

“Gradle 和清单简介” https://commonsware.com/Android/previews/introducing-gradle-and-the-manifest

【讨论】:

    【解决方案2】:

    gradle 用于编译和索引应用程序文件,而 manifest 是在您运行应用程序时加载的文件,android 系统会查看清单文件以检查应用程序所需的硬件要求

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-22
      相关资源
      最近更新 更多