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 に答える