简体   繁体   English

从Android 2.3到android 4

[英]From Android 2.3 to android 4

I'm developing an app testing on Android 2.3, and it works wells. 我正在Android 2.3上开发应用程序测试,它运行良好。 In Android 4 I have put all the Network calls inside a Asyntask and now almost all works fine. 在Android 4中,我已将所有网络调用放在Asyntask中,现在几乎所有工作都正常。 What else do I have to consider? 还有什么我需要考虑的?

But when I try to Crop and Images via Intent, first it disconnect from debugger (¿Why?) when I select the images from the gallery or camera, and when I crop it, when its saving picture, it crashes. 但是当我尝试通过Intent裁剪和图像时,首先它从调试器断开(¿为什么?)当我从画廊或相机中选择图像时,当我裁剪它时,当它保存图片时,它会崩溃。

Now the Eclipse Log doesn't show Exception, or any message that can help me, on 2.3 always print error messages. 现在,Eclipse Log不会显示Exception,或者任何可以帮助我的消息,2.3始终打印错误消息。

Sorry for my english, I hope you understand me, thank you! 对不起我的英文,我希望你理解我,谢谢!

Are you running the crop/save on the UI Thread? 你在UI线程上运行裁剪/保存吗? If you do, StrictMode will come after you for doing disk writes on the UI Thread. 如果这样做,StrictMode将在您在UI线程上执行磁盘写入之后。 Spawn an AsyncTask (or a Thread) to do so and try again. 生成AsyncTask(或线程)来执行此操作并再试一次。

Consider to review any deprecated methods you may be calling, such as getWidth() , navigation hardware keys or preferences related stuff. 考虑查看您可能正在调用的任何已弃用的方法 ,例如getWidth()导航硬件密钥首选项相关的东西。

Also consider adding a custom (versioned) style.xml to support holo theme easily. 还可以考虑添加自定义(版本化)style.xml以轻松支持holo主题 It's best to create a consistent user experience, so under Android 4.0 your visual components should be as 'standard' as possible. 最好是创建一致的用户体验,因此在Android 4.0下,您的可视组件应尽可能“标准”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM