在 android 应用程序 ID 中使用 'in.'(例如 in.example.myapp)

using 'in.' in the android app id (eg. in.example.myapp)

我想知道我是否可以在应用程序 ID 中使用 'in.'。

例如..我可以像这样创建我的应用程序 ID

in.example.myapp

因为我无法使用 cordova CLI 创建它。但是我已经在 config.xml

中更改了它

这是我遇到的错误

cordova create MyApp in.example.myapp MyApp -d
CordovaError: App id contains a reserved word, or is not a valid identifier.
    at C:\Users\USer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\create.js:106:19
    at Promise.apply (C:\Users\USer\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1078:26)
    at Promise.promise.promiseDispatch (C:\Users\USer\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:741:41)
    at C:\Users\USer\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1304:14
    at flush (C:\Users\USer\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3

我可以在 Play 商店发布这样的应用程序吗?

请大家回复..

提前致谢

来自官方文档:

A full Java-language-style package name for the application. The name should be unique. The name may contain uppercase or lowercase letters ('A' through 'Z'), numbers, and underscores ('_'). However, individual package name parts may only start with letters.

To avoid conflicts with other developers, you should use Internet domain ownership as the basis for your package names (in reverse). For example, applications published by Google start with com.google. You should also never use the com.example namespace when publishing your applications.

The package name serves as a unique identifier for the application. It's also the default name for the application process (see the element's process process attribute) and the default task affinity of an activity (see the element's taskAffinity attribute).

Caution: Once you publish your application, you cannot change the package name. The package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version.

是的,您可以在其上使用 "in."... "com." 就像域名所有权,仅此而已。阅读:http://developer.android.com/guide/topics/manifest/manifest-element.html

编辑:这是 Cordova 文档

The element's id attribute provides the app's reverse-domain identifier, and the version its full version number expressed in major/minor/patch notation.

不是 Android 限制,也不是 Play Store 限制 如果是 Cordova 限制,你无能为力...如果不是,post 错误;但是,同样...不是 Android/Play 商店限制。

"in" 是 Javascript 中的 reserved keyword。由于 Cordova 是使用 JS 构建的,因此您不能在包名称中使用它。正如上面 Mariano 所指出的,这不是 Android/Play 商店限制。

Here's a list 个保留关键字:

break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield