这大约是apportable
桥接。
我在layout
中定义了一些具体的main.xml
:
<com.amazon.device.ads.AdLayout
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
当我尝试通过标准
访问它时 (AdLayout) activity.findViewById(R.id.ad_view)
我收到错误:
错误:找不到符号 adView =(AdLayout)activity.findViewById(R.id.ad_view); ^符号:变量id位置:类R
所以问题是:我如何从桥接的Java类访问这个视图?
答案 0 :(得分:0)
请您检查以下地点:
1. You created this main.xml and this one is included in one of the following value in configuration.json:
xml片段必须包含在AndroidManifest.xml中,然后才能使用。
2. If you have made the change in the configuration.json, the next step you may check is the target AndroidManifest.xml, make sure that the main.xml is included in the correct place. If the snippet is not included, you may clean the Build directory of Apportable SDK and redo a load.
希望这些信息能为您提供帮助。
谢谢!