Android 包名称 - 使用破折号 [英] Android Package Name - Using Dashes

查看:63
本文介绍了Android 包名称 - 使用破折号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道您是否可以在 Android 应用程序的包名称中使用破折号?

I was wondering if you could use dashes in a package name for an Android application?

推荐答案

不,不能在包名中使用破折号.

No, you cannot use a dash in your package name.

这是一个很好的问题,可以测试一下.如果您在 Manifest 或类中更改包名称(我也假设是向导),它显然会产生编译时错误.

This is a great question to test for yourself. If you change the package name in your Manifest or class (I assume the wizard too) it will clearly create compile time errors.

@vasart 发布的 link 描述了如何使用如有必要,用下划线代替破折号.

The link that @vasart posted describes how to use an underscore in place of a dash, if necessary.

这篇关于Android 包名称 - 使用破折号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆