native library is not getting loaded to apex_defaults from golang conditional implementation?

后端 未结 1 793
-上瘾入骨i
-上瘾入骨i 2021-01-05 17:42

So I wrote a go file which will dynamically append one library to apex_defaults-> multilib -> first -> native_shared_libs; full code of Android.bp can be checke

相关标签:
1条回答
  • 2021-01-05 18:11

    Reflection in Go can only access exported struct fields, which are the ones that start with an uppercase letter. In your First struct, native_shared_libs is unexported and cannot be accessed using reflection.

    Since the build process uses reflection to access the props struct, it cannot find information from it. You can change it like this:

    type props struct {
        Multilib struct {
            First struct {
               Native_shared_libs  []string
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题