2014-09-06 55 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

相关问题