Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.iml
.gradle
/local.properties
Expand Down
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

139 changes: 0 additions & 139 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/gradle.xml

This file was deleted.

25 changes: 0 additions & 25 deletions .idea/jarRepositories.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/render.experimental.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

26 changes: 18 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ plugins {
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
namespace "com.example.android2021"
compileSdkVersion 34
buildToolsVersion "34.0.0"

defaultConfig {
applicationId "com.example.android2021"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 34
versionCode 1
versionName "1.0"
flavorDimensions "versionCode"
Expand Down Expand Up @@ -55,11 +56,20 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
buildFeatures {
buildConfig = true
}
}

configurations.all {
resolutionStrategy {
force 'androidx.test:core:1.5.0'
}
}

Expand All @@ -83,8 +93,8 @@ dependencies {
implementation 'com.blankj:utilcode:1.30.5'
implementation("com.squareup.okhttp3:okhttp:4.9.0")
implementation 'com.google.code.gson:gson:2.8.6'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0' //json转换
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0' //json转换
implementation 'com.github.bumptech.glide:glide:4.9.0'
kapt 'com.github.bumptech.glide:compiler:4.9.0'

Expand Down
15 changes: 10 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,32 @@
<activity
android:name=".kt05.ScrollingActivity"
android:label="@string/title_activity_scrolling"
android:theme="@style/Theme.Android2021.NoActionBar"></activity>
android:theme="@style/Theme.Android2021.NoActionBar"
android:exported="true" />
<activity
android:name=".kt05.ContentProviderActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_content_provider"
android:theme="@style/Theme.Android2021" />
<activity android:name=".kt05.BroadcastActivity" />
android:theme="@style/Theme.Android2021"
android:exported="true" />
<activity android:name=".kt05.BroadcastActivity"
android:exported="true" />

<service
android:name=".kt05.TestService02"
android:enabled="true"
android:exported="true" />

<activity android:name=".kt05.TestServiceActivity" />
<activity android:name=".kt05.TestServiceActivity"
android:exported="true" />

<service
android:name=".kt05.TestService01"
android:enabled="true"
android:exported="true" />

<activity android:name=".kt05.Tab01Activity" />
<activity android:name=".kt05.Tab01Activity"
android:exported="true" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Tab01Activity : AppCompatActivity() {
}
} ?:return
val ft = supportFragmentManager.beginTransaction()
if (!fragment?.isAdded) {
if (fragment?.isAdded == false) {
ft.add(R.id.container,fragment)
}
currentFragment?.let {
Expand Down
2 changes: 1 addition & 1 deletion app/support/manifest/kt03/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:name="com.example.android2021.kt03.SlideActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait"
>
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.32"
ext.kotlin_version = "1.8.10"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.2"
classpath "com.android.tools.build:gradle:8.3.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Sep 13 17:30:29 CST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip