开发者

Android Emulator opening view at 320*480 when set to 480*854

开发者 https://www.devze.com 2023-01-25 21:23 出处:网络
I am trying to set up an AVD for a 480*854 device. The AVD seems fine but when it opens my app the SurfaceView that I create is opening at 320*480 rather than 480*854. Does anyone have any ideas as to

I am trying to set up an AVD for a 480*854 device. The AVD seems fine but when it opens my app the SurfaceView that I create is opening at 320*480 rather than 480*854. Does anyone have any ideas as to what 开发者_Go百科might be going wrong?

cheers


Solution: Make sure minSdkVersion and targetSdkVersion are specified in the attribute of AndroidManifest.xml. This stops Android from running in 'compatibility mode'.

Thanks everyone for your input.


What are you specifying for minSdkVersion or targetSdkVersion in your manifest's uses-sdk tag? If you don't tell android what version of the platform you're developing for it will run your app in compatibility mode assuming it does not know how to handle different screen sizes and densities.


First open your project and right click on your project see Run As -> Run Configurations.

There are three tag

  1. Android
  2. Target
  3. Common

now click on 2. Target and select your device and apply and run.

0

精彩评论

暂无评论...
验证码 换一张
取 消