From 5137b3d9fcbd3c98b4210311bbf94f2762a6b145 Mon Sep 17 00:00:00 2001 From: williamdeng Date: Fri, 25 Jun 2021 11:24:57 +0800 Subject: [PATCH 1/2] feat: migrate to AndroidX --- android/build.gradle | 16 +++++++++------- .../com/rnim/rn/audio/AudioRecorderManager.java | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 2202314..6d1749c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,14 @@ apply plugin: 'com.android.library' +def DEFAULT_COMPILE_SDK_VERSION = 28 +def DEFAULT_TARGET_SDK_VERSION = 26 + android { - compileSdkVersion 23 - buildToolsVersion "23.0.2" + compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION defaultConfig { - minSdkVersion 16 - targetSdkVersion 23 + minSdkVersion 21 + targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0" } @@ -18,7 +20,7 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:23.1.0' - compile 'com.facebook.react:react-native:+' + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation "androidx.appcompat:appcompat:+" + implementation 'com.facebook.react:react-native:+' } diff --git a/android/src/main/java/com/rnim/rn/audio/AudioRecorderManager.java b/android/src/main/java/com/rnim/rn/audio/AudioRecorderManager.java index 33c65d0..20b8b0d 100644 --- a/android/src/main/java/com/rnim/rn/audio/AudioRecorderManager.java +++ b/android/src/main/java/com/rnim/rn/audio/AudioRecorderManager.java @@ -23,8 +23,8 @@ import android.content.pm.PackageManager; import android.os.Environment; import android.media.MediaRecorder; import android.media.AudioManager; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import com.facebook.react.modules.core.DeviceEventManagerModule; -- Gitee From 486f06a0aca4481ff310408303cd88b598ccbccf Mon Sep 17 00:00:00 2001 From: williamdeng Date: Fri, 25 Jun 2021 21:46:26 +0800 Subject: [PATCH 2/2] feat: fix dependency version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 6d1749c..d63071d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,6 +21,6 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "androidx.appcompat:appcompat:+" + implementation "androidx.appcompat:appcompat:1.3.0" implementation 'com.facebook.react:react-native:+' } -- Gitee