gpt4 book ai didi

android - ApplicationId 不能为空

转载 作者:行者123 更新时间:2023-11-30 03:02:55 25 4
gpt4 key购买 nike

我正在尝试运行这个简单的示例登录测试,但我总是遇到同样的问题:“applicationId”不能为空。我看过以前的问题,但没有人解决我的问题。提前致谢!

字符串.xml:

<string name="app_name">FacebookShareTest</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="app_id">1355*********</string>

androidmanifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.facebooksharetest"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.facebooksharetest.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>


</manifest>

最佳答案

 <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>

应该在应用标签内

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.facebooksharetest"
android:versionCode="1"
android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.example.facebooksharetest.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id" />
</application>
</manifest>

关于android - ApplicationId 不能为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22285599/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com