2014-01-06 40 views
0

Android應用我做了特定製造商的Android設備上,其預裝的應用程序。在此之後,我發佈了應用程序的升級例如初始版本1.0.0.0以升級版本1.2.0.0。如果用戶重新啓動手機,升級應用程序後,我的應用程序將轉到1.0.0.0的初始版本。重置爲舊版本

不知道爲什麼會這樣?將應用程序捆綁到設備中是否存在問題?

注:我通過我的服務器,而不是從Play商店更新我的應用程序和這個問題上的設備,只有當應用程序被預裝重複性。

在這兩種版本的mainfest文件I忘記改變機器人:的versionCode值,在這兩個版本機器人:的versionCode = 3。是否因此造成問題?

我也改變了應用類,所以這是創建該問題的包叫什麼名字?

艙單第一個版本:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.xxx.apps.spinr" 
    android:versionCode="1" 
    android:versionName="1.0.0.0" > 

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


     <application 
      android:icon="@drawable/app_icon" 
      android:label="@string/app_name" 
      android:theme="@style/SpinrTheme" 
      android:name="com.abc.xyz.GDApplication"> 
      <activity 
       android:name=".SplashActivity" 
       android:label="@string/title_activity_splash" > 
       <intent-filter> 
        <action android:name="android.intent.action.MAIN" /> 

        <category android:name="android.intent.category.LAUNCHER" /> 
       </intent-filter> 
      </activity> 
    </application> 
</manifest> 

Mainfest對第二個版本:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     package="com.xxx.apps.spinr" 
     android:versionCode="1" 
     android:versionName="1.2.0.0" > 

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


      <application 
       android:icon="@drawable/app_icon" 
       android:label="@string/app_name" 
       android:theme="@style/SpinrTheme" 
       android:name="com.xxx.apps.GDApplication"> 
       <activity 
        android:name=".SplashActivity" 
        android:label="@string/title_activity_splash" > 
        <intent-filter> 
         <action android:name="android.intent.action.MAIN" /> 

         <category android:name="android.intent.category.LAUNCHER" /> 
        </intent-filter> 
       </activity> 
     </application> 
    </manifest> 
+0

你能解釋的 爲什麼你認爲它仍然是第1版?你期望什麼差異,你沒有看到。 – Doomsknight

+0

在設置 - >應用程序 - >重新啓動後,MyApp的版本爲1.0.0.0,而不是升級版本1.2.0.0。當我啓動應用程序時,我發現舊版本的應用程序 – prateek

+0

是在您重新啓動之前的設置中的版本1.2? – Doomsknight

回答

0

感謝您的建議。正如@Mahmoud在評論中建議「谷歌播放從不發佈具有相同版本代碼的應用程序的更新」,所以我增加了應用程序的版本代碼,它工作正常。 @梆,一達料理鼠王正如我在質詢時說,我沒有更新通過谷歌我的應用程序沒有發揮我的應用程序是玩店,所以我沒能開始摸不着頭腦。無論如何感謝您的幫助。

所以結論是

每當你要發送的應用程序的升級隨時增加版本代碼的應用程序