问题标签 [buildconfig]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
55 浏览

flutter - BuildConfig.java 在颤振中没有正确配置

当我运行我的颤振项目时,我收到以下错误:

我可以看到为什么这是错误的,因为BuildConfig.java包含这一行:

但我的local.properties文件包含正确格式的路径:

我不知道为什么,在构建它时会跳过一个反斜杠。我什至尝试local.properties对此进行编辑:

和这个:

但是一旦我运行该项目,android studio 就会自动将这些更改为以前的状态。

编辑:项目之前运行正常。当我添加com.google.android.libraries.mapsplatform.secrets-gradle-plugin到我的 android gradle 文件时,这一切都开始了。但我不确定这是否与此错误有关。

编辑:我不好,错误确实与com.google.android.libraries.mapsplatform.secrets-gradle-plugin. 删除后,错误得到解决。有人可以解释这种行为。

0 投票
0 回答
33 浏览

android - 具有不同模块(库)的 DeepLinkDispatch

我正在尝试在我的项目中添加DeepLinkDispatch库(由 airbnb 提供)以处理深度链接。该项目有不同的模块,一些链接需要由Activity该模块中的 's 处理。

由于我有不同的风格,我想用 BuildConfig in 定义深层链接的 url build.gradle,以便能够执行以下操作:

但不幸的是,我无法从模块访问 BuildConfig

我还尝试在这样的模块中重现风味:

但似乎这是不可能的,我收到了这个错误:

Product Flavor 'alpha' contains custom BuildConfig fields, but the feature is disabled.

有什么方法可以解决这个问题,而无需在@DeepLink注释中对整个 url 进行硬编码?

编辑:这是主要的应用程序build.gradle