mapbox / mapbox/mapbox-plugins-android

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

オープン
#1,167 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
242
フォーク
116
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

app モジュールの build.gradle と root の build.gradle から始め、Mapbox SDK と Places plugin のバージョンおよびリポジトリに注目してください。失敗を再現し、欠落している RuntimeException のスタックトレースを取得してください。報告された依存関係で Places plugin がその例外をスローしなくなれば、issue は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, java
領域
mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。