【问题标题】:Read the URL from the properties file in android studio从 android studio 的属性文件中读取 URL
【发布时间】:2021-04-26 03:53:37
【问题描述】:

我们可以在创建 apk 后对其进行修改吗?因为我想制作这样一个通过 property file 读取 URL 的 APK,但它不需要重建,例如。我想更改端口号,所以我将通过属性文件更改它还是有其他方法?

【问题讨论】:

  • 该属性文件在哪里?以及您将如何对其进行更改?
  • 我将解压缩 apk,在此我将更改属性文件中的 URL,但更改后不会安装 apk。那么有没有其他方法可以做到,或者是不可能的?

标签: java android android-studio apk


【解决方案1】:

是的,你可以通过使用来做到这一点

可能重复:https://cutt.ly/Vv8FQ0u

ant.propertyfile(
        file: "myfile.properties") {
        entry( key: "propertyName", value: "propertyValue")
        entry( key: "anotherProperty", operation: "del")
    }

【讨论】:

    猜你喜欢
    • 2015-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-11
    • 2021-10-23
    • 1970-01-01
    • 1970-01-01
    • 2023-03-20
    相关资源
    最近更新 更多