From 24a269c93465e87780968e31efe40c516df2d4cf Mon Sep 17 00:00:00 2001 From: tobrun Date: Sat, 9 Mar 2019 11:53:19 +0100 Subject: [PATCH 1/2] Revert "Upgrade to AndroidX (#28)" This reverts commit 701778ccd564a099a13f0dc29ac37299cd60fe94. --- android/build.gradle | 2 +- .../java/com/mapbox/mapboxgl/MapboxMapController.java | 6 ++++-- example/android/app/build.gradle | 11 +++++------ example/android/build.gradle | 2 +- example/android/gradle.properties | 2 -- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8e12e8bc4..9b4dc9405 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,7 +27,7 @@ android { defaultConfig { minSdkVersion 16 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } lintOptions { disable 'InvalidPackage' diff --git a/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java b/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java index 0c268cda3..55cf43253 100644 --- a/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java +++ b/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java @@ -18,7 +18,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Bundle; -import androidx.annotation.NonNull; +import android.support.annotation.NonNull; import android.util.Log; import android.view.View; import android.graphics.PointF; @@ -45,6 +45,8 @@ import com.mapbox.mapboxsdk.location.OnCameraTrackingChangedListener; import com.mapbox.mapboxsdk.location.modes.CameraMode; import com.mapbox.mapboxsdk.location.modes.RenderMode; +import com.mapbox.mapboxsdk.style.layers.RasterLayer; +import com.mapbox.mapboxsdk.style.sources.RasterSource; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; @@ -59,7 +61,7 @@ import java.util.ArrayList; import com.mapbox.mapboxsdk.plugins.annotation.Symbol; - +import android.graphics.PointF; import android.graphics.RectF; /** diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index d9229a9e4..3ca74d5f9 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 27 lintOptions { disable 'InvalidPackage' @@ -35,11 +35,10 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.mapbox.mapboxglexample" minSdkVersion 16 - targetSdkVersion 28 + targetSdkVersion 27 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - // ndk { abiFilters 'armeabi-v7a' } + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { @@ -61,6 +60,6 @@ flutter { dependencies { testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.0-alpha4' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' } diff --git a/example/android/build.gradle b/example/android/build.gradle index 541636cc4..bb8a30389 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:3.2.1' } } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 53ae0ae47..8bd86f680 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1 @@ -android.enableJetifier=true -android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M From ba233c4b577d9a0b98b41cb88fce5ccdb87657a1 Mon Sep 17 00:00:00 2001 From: tobrun Date: Sat, 9 Mar 2019 11:57:13 +0100 Subject: [PATCH 2/2] [android] - bump target SDK version back to 28 --- example/android/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3ca74d5f9..83067e48e 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 27 + compileSdkVersion 28 lintOptions { disable 'InvalidPackage' @@ -35,7 +35,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.mapbox.mapboxglexample" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"