gpt4 book ai didi

Android : retrieve Custom properties from Deploy. 属性或 manifest.xml

转载 作者:行者123 更新时间:2023-11-29 14:11:31 27 4
gpt4 key购买 nike

团队,

我想知道,我们是否可以在Manifest或部署属性中添加自定义配置?如果是,请举例说明。

谢谢,拉梅什

最佳答案

将您的.properties 文件放入/res/raw 目录

try {
Resources resources = this.getResources();
// Check generated R file for name oy your resource
InputStream rawResource = resources.openRawResource(R.raw.resourceFileName);
Properties properties = new Properties();
properties.load(rawResource);
System.out.println("The properties are now loaded");
System.out.println("properties: " + properties);
} catch (NotFoundException e) {
System.err.println("Did not find raw resource: "+e);
} catch (IOException e) {
System.err.println("Failed to open property file");
}

来源:http://myossdevblog.blogspot.com/2010/02/reading-properties-files-on-android.html

关于Android : retrieve Custom properties from Deploy. 属性或 manifest.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2772985/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com