【问题标题】:android studio 1.0 Library projects cannot set applicationId. applicationId is set to '' in default configandroid studio 1.0 库项目无法设置applicationId。 applicationId 在默认配置中设置为 ''
【发布时间】:2015-02-07 03:19:12
【问题描述】:

我在 Aviary 的 build.gradle 中设置了“applicationId aviarySdkPackageName”。 我更新了 android studio,它显示错误:库项目无法设置 applicationId。 applicationId 在默认配置中设置为 ''。 但是在我删除这行之后,Aviary 中出现了很多错误。 你知道我该怎么办吗?

【问题讨论】:

标签: android android-studio android-gradle-plugin aviary


【解决方案1】:

尝试从 库的 build.gradle 文件中的 defaultConfig 中删除 applicationId 参数。

应该可以的

【讨论】:

  • 删除 applicationId 是给error: element value must be a constant expression R.java not found to import。你能解决这个问题吗?
  • 我认为您的错误不是由于删除了applicationId引起的。尝试制作一个“干净的项目”,如果不起作用,请尝试恢复 applicationId 并查看问题是否仍然存在(只是为了说明错误是由于删除了 applicationId)。
【解决方案2】:
   # ApplicationId in Library Projects#

    You cannot use applicationId to customize the package of a library project. The package name has to be fixed in library projects (and specified as packageName in the manifest). The Gradle plugin did not enforce this restriction earlier.

【讨论】:

    猜你喜欢
    • 2015-02-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-18
    • 2016-04-25
    • 1970-01-01
    • 2012-01-13
    相关资源
    最近更新 更多