现在我在我的android项目中添加了第三个库,它包含一些定义字符串,drawable,颜色等的资源。我想在Project xml文件中引用第三个库中的一些资源。许多人已经尝试过,而不是工作。任何可以给我一些帮助的帮助都将不胜感激。
例如,引用如下字符串:
<TextView
android:id="@+id/date_heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_column="0"
app:layout_row="5"
android:text="@string/date_heading"
android:visibility="gone"
style="@style/MessageHeaderDetailsHeadingStyle" />
字符串&#34; date_heading&#34;已在第三个库中定义。
答案 0 :(得分:0)
您应该使用该资源的完整路径,例如com.example.project.date_heading
,其中com.example.project
是库的包名。