Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Caused by: java.lang.RuntimeException when using mapbox plugin places.

Open
#1,167 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java
Domain
mobile

Research direction

Start with the app module's build.gradle and the root build.gradle, focusing on the Mapbox SDK and Places plugin versions and repositories. Reproduce the failure and capture the missing RuntimeException stack trace; the issue is done when the Places plugin no longer throws that exception with the reported dependencies.

Written by the indexing model from the issue text.

Description

A runtime exception error is been caused when im using the below dependency :

    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v9:0.12.0'

My mabbox dependencies are :

//Map Box
    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v9:0.12.0'

My build.gradle file:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'


    def ENVIRONMENT_PRODUCTION = "\"ENVIRONMENT_PRODUCTION\""
    def ENVIRONMENT_TEST_BED = "\"ENVIRONMENT_TEST_BED\""
    def ENVIRONMENT_DA = "\"ENVIRONMENT_DA\""
    def ENVIRONMENT_LOCAL_GENY = "\"ENVIRONMENT_LOCAL_GENY\""
    def ENVIRONMENT_LOCAL_EMUL = "\"ENVIRONMENT_LOCAL_EMUL\""

    //Select Correct Build Environment  before building from above
    def BUILD_ENVIRONMENT = ENVIRONMENT_TEST_BED

    lintOptions {
        abortOnError false
    }

    signingConfigs {
        release {
            storeFile file("etc/keys/apptizer.keystore")
            storePassword "apptizer"
            keyAlias "apptizer"
            keyPassword "apptizer"
        }
        clover {
            storeFile file("etc/keys/apptizer.keystore")
            storePassword "apptizer"
            keyAlias "apptizer"
            keyPassword "apptizer"
            v2SigningEnabled false
        }
    }

    def buildType = "debug"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 176
        versionName "1.0.0.14.RELEASE"
        multiDexEnabled true
        signingConfig signingConfigs.release
        buildConfigField "String", "ENVIRONMENT", BUILD_ENVIRONMENT
        logger.warn('\n\nBUILD ENVIRONMENT SELECTED >>> ' + BUILD_ENVIRONMENT + "\n\n")

        applicationVariants.all { variant ->
            renameAPK(variant, defaultConfig, BUILD_ENVIRONMENT, buildType)
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildType = "release"
        }
    }

    flavorDimensions "main"

    productFlavors {
        poynt {
            applicationId "io.apptizer.pos"
            dimension "main"
        }
        standalone {
            applicationId "io.apptizer.merchant.standalone"
            dimension "main"
        }
        dtp_hnb {
            applicationId "io.apptizer.merchant.dtp.hnb"
            dimension "main"
        }
        clover {
            applicationId "io.apptizer.business.clover"
            minSdkVersion 17
            targetSdkVersion 25
            signingConfig signingConfigs.clover
            dimension "main"
        }
        aevi {
            applicationId "io.apptizer.merchant.aevi"
            minSdkVersion 22
            dimension "main"
        }
        verifone {
            applicationId "io.apptizer.merchant.verifone"
            minSdkVersion 22
            dimension "main"
        }
    }
    dataBinding {
        enabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/proguard/androidx-annotations.pro'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    preBuild.dependsOn copyConfig(BUILD_ENVIRONMENT)

}
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation fileTree(include: ['*.jar'], dir: 'libs/printer')
    implementation fileTree(include: ['*.aar'], dir: 'libs/single-date-and-time-picker')
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    testImplementation 'junit:junit:4.12'
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    //Swipeable list view
    implementation "com.daimajia.swipelayout:library:1.2.0@aar"
    //color picker
    implementation 'com.larswerkman:HoloColorPicker:1.5'
    //image loader
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.squareup.okhttp:okhttp:2.7.5'
    // Poynt Dependencies
//    poyntImplementation 'co.poynt.api:android-api-model:1.2.108@jar'
//    poyntImplementation 'co.poynt.android.sdk:poynt-sdk:1.2.27@aar'
    //QR Code Reader dependencies
    implementation 'com.google.zxing:core:3.2.1'
    implementation 'com.journeyapps:zxing-android-embedded:3.5.0'
    //GCM dependencies
    implementation 'com.google.android.gms:play-services-analytics:11.0.4'

    implementation('com.github.jkwiecien:EasyImage:2.0.0') {
        transitive = false
    }
    dtp_hnbImplementation(name: 'mswipechippersdk', ext: 'aar')
    aeviImplementation(name: 'AeviApi-2.7.2', ext: 'aar')
    cloverImplementation 'com.clover.sdk:clover-android-sdk:219.5'
    verifoneImplementation(name: 'PaymentManager-1.9.0.352-release', ext: 'aar')
    verifoneImplementation(name: 'DeveloperSDK-release-2.3.18', ext: 'aar')
    //dropbox sdk
    implementation 'com.dropbox.core:dropbox-core-sdk:3.0.3'
    implementation 'com.squareup.okhttp3:okhttp:3.5.0'
    implementation 'androidx.multidex:multidex:2.0.0'
    //Fullscreen webview
    implementation 'com.thefinestartist:finestwebview:1.2.7'
    implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
        transitive = true;
    }
    implementation 'com.github.gcacace:signature-pad:1.2.1'
    implementation 'org.apache.httpcomponents:httpmime:4.2.3'
    implementation "com.mikepenz:iconics-core:3.0.3@aar"
    implementation "com.mikepenz:iconics-views:3.0.3@aar"
    implementation 'com.mikepenz:ionicons-typeface:2.0.1.4@aar'
    implementation 'com.mikepenz:fontawesome-typeface:5.0.13.0@aar'

    //  compile 'com.squareup.okhttp3:logging-interceptor:3.9.1'

    def lifecycle_version = "1.1.1"

    // ViewModel and LiveData
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'

    //DateTime Picker : https://github.com/florent37/SingleDateAndTimePicker
//    implementation 'com.github.florent37:singledateandtimepicker:2.1.0'

    //Used to generate html bitmap for newer receipt versions
    implementation 'com.izettle:html2bitmap:1.9'
    implementation 'org.apache.velocity:velocity:1.7'
    //todo need to be removed and implemented in our own way had to added as a hotfix for round1 unreproducible crash
    implementation 'me.drakeet.support:toastcompat:1.1.0'

    //GCM dependencies
    implementation 'com.google.android.gms:play-services-gcm:16.1.0'
    implementation 'com.google.android.gms:play-services-analytics:16.0.8'

    //Firebase
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-database:17.0.0'

    //Streams
    implementation 'com.annimon:stream:1.2.1'

    // Rx Java
    implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'

    // Retrofit
//    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
//    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
//    implementation 'com.squareup.retrofit2:adapter-rxjava2:2+'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

    implementation 'com.google.android.material:material:1.0.0'

//Map Box
    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v9:0.12.0'

}

def renameAPK(variant, defaultConfig, environment, buildType) {
    variant.outputs.all { output ->
        def readableEnvironment = environment.replace("\"", "").replace("_", "-").toLowerCase()
        outputFileName = applicationName + "-v-" + defaultConfig.versionName + "-" + defaultConfig.versionCode + "-" + variant.productFlavors[0].name + "-" + buildType + "-" + readableEnvironment + ".apk"
    }
}

def copyConfig(environment) {

    return tasks.create("copyConfiguration", Copy) {
        logger.warn('Copy config for envi >>> ' + environment + "\n\n")
        def directoryToCopy
        switch (environment) {
            case "\"ENVIRONMENT_PRODUCTION\"":
                directoryToCopy = "env/production/"
                break;
            case "\"ENVIRONMENT_TEST_BED\"":
                directoryToCopy = "env/testbed/"
                break;
            default:
                directoryToCopy = "env/development/"
        }
        from directoryToCopy
        into '.'
    }
}

my root build.gradle :

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

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/"
        }
        maven { url 'https://maven.fabric.io/public' }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'io.fabric.tools:gradle:1.+'
        classpath "io.realm:realm-gradle-plugin:5.3.1"
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
        flatDir{
            dirs "libs","libs/verifone_sdk","libs/printer"
        }
        repositories {
            maven { url 'https://maven.fabric.io/public' }
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        maven { url 'https://mapbox.bintray.com/mapbox' }
//        maven {
//            url 'https://nexus.poynt.com/content/repositories/releases'
//        }
    }
}

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

If someone could help with the issue, ill be grateful to u.

Dominant language
Java
Stars
242
Forks
116
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-plugins-android

All issues in mapbox/mapbox-plugins-android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.