hyandroid

Results 3 issues of hyandroid

你好,请教一个问题,宿主apk 和 插件apk是单独打包的,这样会导致资源id冲突。 现在插件apk中有两种引用color资源的方式: 1.xml引用: android:background="@color/color_plugin" 2.代码设置:findViewById(R.id.myView).setBackgroundColor(resources!!.getColor(R.color.color_plugin)) 第二种方式没问题,取得是插件中的色值,而第一种方式会取到宿主中对应的R文件索引的色值,这个是什么原因呢?