簡體   English   中英

為Android構建時出現Facebook Unity SDK問題

[英]Facebook Unity SDK issues when building for Android

在為Android進行構建時,我無法解決此構建時問題。

這是錯誤消息:

AndroidManifest.xml:39: Tag <provider> attribute authorities has invalid character '$'.

我確實在Temp / StagingArea文件夾中生成的AndroidManifest.xml中找到以下幾行:

 <!--
         The initialization ContentProvider will call FacebookSdk.sdkInitialize automatically
         with the application context. This config is merged in with the host app's manifest,
         but there can only be one provider with the same authority activated at any given
         point; so if the end user has two or more different apps that use Facebook SDK, only the
         first one will be able to use the provider. To work around this problem, we use the
         following placeholder in the authority to identify each host application as if it was
         a completely different provider.
        -->

    <provider android:authorities="${applicationId}.FacebookInitProvider" android:exported="false" android:name="com.facebook.internal.FacebookInitProvider" />

看起來applicationId替代項無法正常工作,但我已按照文檔中所述正確地將其放置在Facebook設置中。

在安裝了Facebook SDK插件的空項目中,在Unity 2017.2和2018.1上使用Facebook SDK 7.10、7.11和7.12對其進行了嘗試。

外面有人對這里發生的事情有任何想法嗎?

嘗試用您的應用程序ID替換它,$返回包名而不是appID。

<provider android:authorities="FacebookInitProvider{APP ID HERE}" android:exported="true" android:name="com.facebook.internal.FacebookInitProvider" />

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM