Xamarin Android APK 与 AndroidManifest.xml 中不同的名称
Xamarin Android APK different name then in AndroidManifest.xml
在我们的 Xamarin Android 项目中,我的同事正在研究 APK 包名称。
它应该是这样的:com.company.4productname.mobile
但是,现在是:com.company.x4productname.mobile.
文件中没有,我们可以找到这个不正确的名字。似乎这个名字没有存储为文本。
您知道可以将其存储在哪里吗?
根据 Android 文档,packageName/applicationId 具有以下规则:
And although the application ID looks like a traditional Java package
name, the naming rules for the application ID are a bit more
restrictive:
- It must have at least two segments (one or more dots).
- Each segment must start with a letter.
- All characters must be alphanumeric or an underscore [a-zA-Z0-9_].
来源:https://developer.android.com/studio/build/application-id
Xamarin 工具似乎在“4”前面添加了 "x",因为以数字开头违反了这些规则。我还能够在 Android Studio 中重新创建它,并且 Android Studio 实际上会因为规则而生成错误。所以看起来 Xamarin 捕获了这个错误,然后 "fixes" 为你解决。
在我们的 Xamarin Android 项目中,我的同事正在研究 APK 包名称。 它应该是这样的:com.company.4productname.mobile 但是,现在是:com.company.x4productname.mobile.
文件中没有,我们可以找到这个不正确的名字。似乎这个名字没有存储为文本。
您知道可以将其存储在哪里吗?
根据 Android 文档,packageName/applicationId 具有以下规则:
And although the application ID looks like a traditional Java package name, the naming rules for the application ID are a bit more restrictive:
- It must have at least two segments (one or more dots).
- Each segment must start with a letter.
- All characters must be alphanumeric or an underscore [a-zA-Z0-9_].
来源:https://developer.android.com/studio/build/application-id
Xamarin 工具似乎在“4”前面添加了 "x",因为以数字开头违反了这些规则。我还能够在 Android Studio 中重新创建它,并且 Android Studio 实际上会因为规则而生成错误。所以看起来 Xamarin 捕获了这个错误,然后 "fixes" 为你解决。