简体   繁体   English

如何使我的应用在所有设备上都能正常工作?

[英]How to make my app work in all devices?

i made android app for minSdkVersion 23 and targetSdkVersion 23.while launching i saw that this can only support 5000 devices in 15000 devices.i want to make this app support for all devices.how can i do? 我为minSdkVersion 23和targetSdkVersion 23制作了一个Android应用程序,在启动时我看到它只能在15000个设备中支持5000个设备。我想使该应用程序对所有设备都支持。

defaultConfig {
    applicationId "com.love.ksr_red_app"
    minSdkVersion 23
    targetSdkVersion 23
    versionCode 2
    versionName "2.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

It depends on minSdkVersion and targetSdkVersion. 它取决于minSdkVersion和targetSdkVersion。

Try making minSdkVersion to lowest OS version to which you make your app compatible with. 尝试将minSdkVersion为与您的应用程序兼容的最低操作系统版本。

And make targetSdkVersion to the latest OS version available. 并使targetSdkVersion到最新的OS版本。 This will make sure that your application is targeting towards all the devices available in the market and will compatible with them. 这将确保您的应用程序面向市场上所有可用的设备,并与它们兼容。

i want to make this app support for all devices.how can i do? 我想使此应用程序支持所有设备。我该怎么办?

Well..., That looks practically impossible. 好吧...,这几乎是不可能的。 Though you can try below thing... which will make your app support most of the devices that are present in the market 尽管您可以尝试以下方法...这将使您的应用支持市场上存在的大多数设备


1) Launch android studio and Create new project 1)启动android studio并创建新项目

微微网

2) Name new project 2)命名新项目

pictwo

3) select the minimum support version user friendly 3)选择用户友好的最低支持版本

th

Look it will be supporting 96 % of the devices in the market 看起来它将支持市场上96%的设备

Things to keep in mind : 注意事项:

  1. Very old devices are no more there in market like android 1.0 to 4.0 市场上已经没有像Android 1.0到4.0这样的旧设备了
  2. By doing this way it ensures you are going to give support to the maximum number of the devices you can 通过这种方式,可以确保您将支持尽可能多的设备
  3. It will make and alter the things necessary for you in the project 在项目中它将为您制作和更改必要的东西
  4. Most importantly... you have to manage exceptions and build versions via code..!! 最重要的是……您必须通过代码管理exceptionsbuild versions
  5. There are some devices like VIVO in india or other countries which takes android and modifies it to FuntouchOS which will not let you start your program ON_BOOT_COMPLETED ... Such phones are based on android and not purely android like others. 在印度或其他国家/地区,有一些像VIVO这样的设备会把android并将其修改为FuntouchOS ,这将使您无法启动程序ON_BOOT_COMPLETED ...这样的手机基于android而不是纯粹的android。
  6. Thats why it is not practically possible to support all the devices which shows you in Google console in numbers; 这就是为什么实际上不可能支持所有可以在Google console以数字显示您的设备的原因; while uploading an app

Hope it helps you or someone else 希望对您或其他人有帮助

Change your buile.gradle with this configration. 使用此配置更改您的buile.gradle。

**android {

    compileSdkVersion 25
    defaultConfig {
        applicationId "com.websinfotech.apptophonecallexample"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

}**

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

相关问题 如何让应用程序 UI 在所有设备上 100% 相同? - How to make app UI to work 100% same on all devices? 如何使我的Android应用分辨率适合所有设备? - How to make my Android app resolution suit all devices? 如何让我的应用在所有设备中看起来都一样? - How to make my app look the same in all devices? 如何使我的应用程序在所有设备上可见? - How to make my application visible for all devices? 如何使我的App在Huawei设备上受保护 - How to make my App Protected on Huawei devices 如何使PhoneGap Android APP适应所有设备? - How do I make my PhoneGap Android APP fit all devices? React Native - 如何使 ScrollView 中的 KeyboardAvoidingView 适用于所有设备? - React Native - How to make KeyboardAvoidingView inside a ScrollView work for all devices? 如何使自定义windowBackground主题样式适用于所有Android设备? - How to make custom windowBackground theme style work on all Android devices? 我的应用不适用于市场上的所有设备 - my app is not for all devices in market 如何使应用程序在所有设备上看起来都一样 (android) - How to make a app scale the look the same on all devices (android)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM