上传Xamarin构建包至HockeyApp时遇错误:versionCode需≥1
Fixing "Hockeyapp - Please make sure that the versionCode is 1 or higher" in Xamarin
Let's get this sorted out—this error pops up because HockeyApp requires your app to have a version code (or equivalent build number for iOS) that's at least 1. Here's how to update it for both Xamarin platforms:
For Xamarin.Android Projects
- Open your Android project, navigate to the
Propertiesfolder and openAndroidManifest.xml - Look for the
<manifest>tag, check theandroid:versionCodeattribute. Make sure it's an integer greater than or equal to 1. Example:<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0.0"> - Alternatively, use the project properties UI: Right-click your Android project → Properties → Android Manifest. In the Version Information section, set the Version Code to 1 or a higher integer.
For Xamarin.iOS Projects
- Right-click your iOS project → Properties → iOS Application
- In the Version section, update the Build number to an integer ≥1 (HockeyApp uses this build number as the equivalent of Android's versionCode). Note: This build number must be a whole number, no decimals allowed.
- If you prefer editing
Info.plistdirectly: Find theCFBundleVersionkey and set its value to a whole number ≥1.
Extra Troubleshooting Tips
- After updating the version code/build number, rebuild your project to ensure the new value is included in your APK/IPA.
- If the error persists, try cleaning your project first (Right-click project → Clean) then rebuild and re-upload—sometimes cached build artifacts can cause old version numbers to stick around.
内容的提问来源于stack exchange,提问作者Post Impatica
相关产品推荐
相关产品推荐

