Meteor minSdkVersion not read by the Google Play Console

When adding the apk file to the google play console, the minimum API level information is not read. In the mobile-config.js file I set the following parameters:

App.setPreference('android-targetSdkVersion', '28');
App.setPreference('android-minSdkVersion', '24');

target sdk works but google play console sets min sdk to API Level 19+. Is there a way to set this correctly? I would like to support applications with android 7.0+

Ok, perhaps not a full solution but a hint. When I was experimenting building Meteor Android with Android Studio, on the first build I was getting an error message advising to not set the minimum SDK version in android/app/AndroidManifest.xml ( <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26" />)and to keep it in the build.gradle file. I notice in my project, the version is set at android/build.gradle.
It looks as follows. Iā€™d start by making sure that the gradle files have the intended minimum SDK version set.

/* Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="28.0.3" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

1 Like

Hi,
Thank you for your Hint. At the next implementation, I will share information on how it went

Hey again,
I tested this hint today and it looks like it works, which makes me happy :slight_smile: However, this should be set in mobile-config.js. of course

1 Like