支持的Android设备

时间:2017-09-08 03:37:00

标签: android apk

我上传了我的apk它总是显示它是由0个android设备支持。请帮助我成功启动我的第一个应用程序。我上传了12个版本,但没有任何人工作。我基本上在我的应用程序中使用位置短信和联系人阅读权限。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="deepesh.travel.abhay.applayout" android:versionCode="5" xmlns:tools="http://schemas.android.com/tools">

    <!-- To auto-complete the email text field in the login form with the user's emails -->
    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />
    <uses-feature android:name="android.hardware.sensor.compass"
        android:required="false" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <application
        android:name="deepesh.travel.abhay.applayout.saved_data_elements"
        android:allowBackup="true"
        tools:replace="icon, label"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyDNVWdbxYpqG08j-wytsWb5cwrBM0mN1ro" />

        <activity android:name="deepesh.travel.abhay.applayout.WelcomeActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="deepesh.travel.abhay.applayout.MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="deepesh.travel.abhay.applayout.SettingTest"
            android:label="@string/title_activity_settings"
            android:parentActivityName="deepesh.travel.abhay.applayout.MainActivity">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="deepesh.travel.abhay.applayout.MainActivity" />
        </activity>
        <activity
            android:name="deepesh.travel.abhay.applayout.Tutorial"
            android:label="@string/tutorial"
            android:parentActivityName="deepesh.travel.abhay.applayout.SettingTest">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="deepesh.travel.abhay.applayout.MainActivity" />
        </activity>
        <activity
            android:name="deepesh.travel.abhay.applayout.privacyPolicy"
            android:label="@string/privacy"
            android:parentActivityName="deepesh.travel.abhay.applayout.SettingTest">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="deepesh.travel.abhay.applayout.MainActivity" />
        </activity>
        <receiver android:name="deepesh.travel.abhay.applayout.AlarmReceiver" />
    </application>

</manifest>

和我的build.gradle文件是这样的:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "deepesh.travel.abhay.applayout"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 12
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {

        javaMaxHeapSize "2048M"
    }
}


buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile "com.android.support:support-v4:25.3.1"
    compile 'com.android.support:mediarouter-v7:25.3.1'
    compile "com.android.support:support-v13:25.3.1"
    compile "com.android.support:appcompat-v7:25.3.1"
    compile "com.android.support:cardview-v7:25.3.1"
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.almworks.sqlite4java:sqlite4java-win32-x64:1.0.392'
    compile 'com.android.support:preference-v7:25.3.1'
    compile 'com.google.android.gms:play-services:10.2.1'
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
    compile 'com.google.android.gms:play-services-ads:10.2.1'

    compile 'com.google.android.gms:play-services:8.4.0'
    testCompile 'junit:junit:4.12'
}

请帮我成功启动我的第一个应用。我上传了12个版本,但没有任何人工作。我基本上在我的应用程序中使用位置短信和联系人阅读权限。

2 个答案:

答案 0 :(得分:0)

删除<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />

如果你在gradle中定义,那么你是否定位到23 版本

然后将compileSdkVersion 25 buildToolsVersion "25.0.3"保留为26

android:roundIcon="@mipmap/ic_launcher"这适用于 Android O ,即26

因此,使用版本

进行混合,使您的构建正常

app gradle

compileSdkVersion 26
buildToolsVersion "26.0.1"

minSdkVersion 14
targetSdkVersion 26
versionCode 13
versionName "1.0"

答案 1 :(得分:0)

像这样制作构建gradle文件。

&#13;
&#13;
apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "deepesh.travel.abhay.applayout"
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 17
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {

        javaMaxHeapSize "2048M"
    }
}


buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile "com.android.support:support-v4:26.+"
    compile 'com.android.support:mediarouter-v7:26.+'
    compile "com.android.support:support-v13:26.+"
    compile "com.android.support:appcompat-v7:26.+"
    compile "com.android.support:cardview-v7:26.+"
    compile 'com.android.support:design:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.+'
    compile 'com.almworks.sqlite4java:sqlite4java-win32-x64:1.+'
    compile 'com.android.support:preference-v7:26.+'
    compile 'com.google.android.gms:play-services:10.2.1'
    compile 'commons-io:commons-io:2.4'
    compile 'com.google.android.gms:play-services-ads:10.2.1'

    compile 'com.google.android.gms:play-services:8.4.0'
    testCompile 'junit:junit:4.12'
}
&#13;
&#13;
&#13;

从mainifest文件中删除。