0

这是关于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 类中访问这个视图?

4

1 回答 1

0

请您检查以下地点:

1. You created this main.xml and this one is included in one of the following value in configuration.json:
  • "MANIFEST_EXTRAS":"",
  • "ACTIVITY_MANIFEST_EXTRAS":"",
  • "APPLICATION_MANIFEST_EXTRAS":"",

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.

希望这些信息可以帮助你。

谢谢!

于 2013-12-09T07:46:25.340 回答