From e26f0bb51f339902c4d5e730b80a0d35573c630f Mon Sep 17 00:00:00 2001 From: "jonghen.han" Date: Tue, 26 Apr 2022 13:58:56 +0900 Subject: [PATCH] Upgrade SDK version and fix build error --- AndroidManifest.xml | 6 ++++-- build.gradle | 16 ++++++++++------ gradle.properties | 2 ++ res/layout/activity_main.xml | 3 ++- settings.gradle | 0 src/com/connectsdk/sampler/MainActivity.java | 19 ++++++++++--------- .../sampler/SectionsPagerAdapter.java | 7 ++++--- .../sampler/fragments/BaseFragment.java | 2 +- .../sampler/fragments/WebAppFragment.java | 2 +- 9 files changed, 34 insertions(+), 23 deletions(-) create mode 100644 gradle.properties create mode 100644 settings.gradle diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ba217d9..4fe7a4c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -16,13 +16,15 @@ android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme" > + android:theme="@style/AppTheme" + android:usesCleartextTraffic="true" > + android:screenOrientation="portrait" + android:exported="true" > diff --git a/build.gradle b/build.gradle index 81de79e..1fd8da7 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.1' + classpath 'com.android.tools.build:gradle:7.0.2' } } @@ -20,12 +20,12 @@ allprojects { apply plugin: 'com.android.application' android { - compileSdkVersion 22 + compileSdkVersion 31 defaultConfig { applicationId "com.connectsdk.sampler" - minSdkVersion 10 - targetSdkVersion 22 + minSdkVersion 24 + targetSdkVersion 31 } sourceSets { @@ -49,10 +49,14 @@ android { } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { implementation 'com.github.ConnectSDK:Connect-SDK-Android-Lite:master-SNAPSHOT' - implementation 'com.android.support:support-v4:22.2.1' - implementation 'com.android.support:appcompat-v7:22.+' + implementation 'androidx.appcompat:appcompat:1.4.0' + implementation "androidx.viewpager2:viewpager2:1.0.0" } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..5465fec --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml index a67ef45..a9f4917 100644 --- a/res/layout/activity_main.xml +++ b/res/layout/activity_main.xml @@ -1,4 +1,5 @@ - +