在应用程序计费示例应用程序中不起作用
我是 android 新手..我已经下载了应用内计费示例应用程序..示例应用程序的包名称是 com.example.dungeons ..但是为了将此应用程序发布到 android 市场,我必须将包名称更改为其他的,因为默认情况下android不允许发布包名为com.example的应用程序..但是当我更改包名称时我的应用程序崩溃了并且我的日志猫不显示任何内容..
对此有任何帮助??
谢谢, 拉杰
I am new to android .. I have downloaded the In App billing sample application.. The package name of the sample application is com.example.dungeons .. But inorder to publish this application to android market I have to change the package name to something else because by default android doesn't allow the application with package name com.example to be published.. But when I change the package name my application is getting crashed and my log cat doesn't show anything..
Any help on this ??
Thanks,
Raj
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 shlublu 是对的,并添加了更多内容。
1)首先将包名重命名为com.example.dungeons
中更改其活动包名
2)打开menifest文件并在活动标签<< 活动 android:name="com.anotherexample.dungeons.SampleActivity" />
3)在所有包上请执行 ctrl+shift+o 以便所有文件都获得正确的包
4)如果需要清理项目并运行
希望它能工作。
I think shlublu is right , in adding more to it.
1)first rename the package name com.example.dungeons
2)Open menifest file and change its activities package name in activity tag
< activity android:name="com.anotherexample.dungeons.SampleActivity" />
3)on all package please do ctrl+shift+o so all files get its proper package
4) if require clean the project and run
hope it will work.
我很确定这是由于您的 Android 清单文件和 Java 源文件之间的差异造成的:
如果您更改了清单文件中的包名称,但没有在源文件中相应地重命名包,您的
Activities
无法正常启动:清单文件声明它们属于您选择的新包名称,但在源文件中它们仍然属于com.example.dungeons
。关于logcat,这是另一个问题了。您必须在运行模式而不是调试模式下启动应用程序。
I am pretty sure this comes from a discrepancy between your Android-manifest file and your Java source files:
if you have changed the package name in the manifest file without renaming the packages accordingly in your source files, your
Activities
won't start properly: the manifest file declares they belong to the new package name you have chosen but in your source files they are still belonging tocom.example.dungeons
.About logcat, this is another question. You must have started your app in run mode instead of debug mode.