我有一个应用程序应该只在手机中运行。
对于我设置的平板电脑
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />
但是,我怎么能只对手机设备做同样的事情呢?
我读过<compatible-screens>
但它对我没有帮助。(例如应用程序与某些手机(如HTC One,三星Galaxy s3,s4等)不兼容)
你能告诉我一个最好的解决方案吗?
添加 <uses-feature android:name="android.hardware.telephony" android:required="true">
到您的安卓清单.xml
<supports-screens
android:anyDensity="true"
android:largeScreens="false"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="false" />
是否仅手机需要清单条目
点击这里查看安卓文档。