2014-09-06 56 views
2

從google play的文檔中,我瞭解到搜索和應用程序時android:name也很重要。我的應用程序被稱爲「Bike Dice」,但只有在搜索「BikeDice」時纔會出現,它是AndroidManifest.xml文件中的名稱。我嘗試將它改爲「自行車骰子」,它在啓動時打破了代碼和應用程​​序崩潰,但是當我嘗試在谷歌播放中更新它時,我發現它在搜索「自行車骰子」時首先出現。Android中的空間:AndroidManifest.xml中的名稱

所以我的問題是:有沒有黑客或其他什麼東西,讓你有兩個詞android:name

編輯:這是我的AndroidManifest.xml文件:你的清單已經有一個名爲android:label這是自動生成的屬性

<?xml version='1.0' encoding='utf-8'?> 
<manifest android:versionCode="102" android:versionName="0.1.2" android:windowSoftInputMode="adjustPan" package="com.dice.bike" xmlns:android="http://schemas.android.com/apk/res/android"> 
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> 
    <application android:debuggable="false" android:icon="@drawable/icon" android:label="@string/app_name"> 
     <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:launchMode="singleTop" android:name="BikeDice" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 
     <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.android.gms.ads.AdActivity" android:theme="@android:style/Theme.Translucent" /> 
    </application> 
    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" /> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
</manifest> 
+0

您能分享一個鏈接到這個官方參考嗎? – 2014-09-06 15:07:50

回答

4

通知。

android:name="BikeDice" 
    android:icon="@drawable/icon" 
    android:label="@string/app_name" 

所以你只需要選擇res/values/string.xml文件和<resources>組標籤

<string name="app_name">Bike Dice</string> 

內的Bike Dice取代的app_name內容現在,它可能只是說BikeDice,因爲這可能當您第一次使用new Android Project嚮導時,您指定爲應用程序名稱。

+0

這聽起來不錯!你能幫我解決這個問題嗎?用xml不太好... 我知道你可能沒有足夠的時間教會像我這樣的人,所以一個課程的鏈接可以正常工作;) – user3127242 2014-09-06 15:15:16

+0

嗯,問題是應用程序仍然崩潰。我不是在談論android:標籤,而是關於android:name。你確定它可以包含2個單詞,即使我使用它像@ srting/android_name? – user3127242 2014-09-06 15:29:38

+0

不要對android:name使用兩個單詞。使用android:標籤,這就是谷歌商店搜索引擎將索引。我自己做了這個實驗。我甚至還通過電子郵件向以下開發者發送了更正清單https://play.google.com/store/apps/details?id=com.inappsquared.devappsdirect(但他顯然尚未遵循我的建議,因爲您可以只需輸入「Dev Apps Direct」即可找到他的應用程序,這真是一個恥辱,他的應用程序確實是一個很好的應用程序,他不會因爲不這樣做而丟失流量)。 – 2014-09-06 15:32:44

相關問題