Xml namespace declaration: auto-substitute package name

前端 未结 1 1928
[愿得一人]
[愿得一人] 2021-01-30 08:52

I have an android project with multiple build targets (using ant). For testing purposes, those build targets all have different package names (so my package name is com.mycompan

相关标签:
1条回答
  • 2021-01-30 09:24

    Turns out that there is a postfix for that: res-auto.

    So all you need to do is write

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:custom="http://schemas.android.com/apk/res-auto" />
    

    This will automatically use current package name.

    0 讨论(0)
提交回复
热议问题