commit eeb820342fb0ebe9625b592feb439d3475118da7 Author: xiajiid Date: Sun Feb 8 00:32:18 2026 +0800 Initial commit: Android app with compileSdk 34, minSdk 24, targetSdk 34 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e60ba9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +captures +.externalNativeBuild +.cxx +local.properties +*.apk +*.aab +*.ap_ +*.dex +*.class +bin/ +gen/ +out/ +build/ +proguard/ +*.log +.navigation/ +captures/ +*.jks +*.keystore \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..af34c04 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# LogCam + +A simple Android application demo project. + +## Project Structure + +``` +logcam/ +├── app/ +│ ├── src/main/ +│ │ ├── java/com/example/app/ +│ │ │ └── MainActivity.kt +│ │ ├── res/ +│ │ │ ├── layout/ +│ │ │ │ └── activity_main.xml +│ │ │ ├── values/ +│ │ │ │ ├── colors.xml +│ │ │ │ ├── strings.xml +│ │ │ │ └── themes.xml +│ │ │ └── mipmap-*/ +│ │ └── AndroidManifest.xml +│ └── build.gradle +├── build.gradle +├── settings.gradle +├── gradle.properties +└── .gitignore +``` + +## Configuration + +- **compileSdkVersion**: 34 +- **minSdkVersion**: 24 +- **targetSdkVersion**: 34 +- **applicationId**: com.example.app + +## Getting Started + +1. Clone the repository +2. Open in Android Studio +3. Build and run + +## License + +MIT \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..9d8b776 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.example.app' + compileSdk 34 + + defaultConfig { + applicationId "com.example.app" + minSdk 24 + targetSdk 34 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.11.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..103c677 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/example/app/MainActivity.kt b/app/src/main/java/com/example/app/MainActivity.kt new file mode 100644 index 0000000..e675925 --- /dev/null +++ b/app/src/main/java/com/example/app/MainActivity.kt @@ -0,0 +1,11 @@ +package com.example.app + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..ea3335f --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,33 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..4ea6773 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + LogCam + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..6061552 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..4155458 --- /dev/null +++ b/build.gradle @@ -0,0 +1,21 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '8.2.0' apply false + id 'org.jetbrains.kotlin.android' version '1.9.20' apply false +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +gradle android { + compileSdkVersion 34 // 编译时使用的API版本 + defaultConfig { + applicationId "com.example.app" + minSdkVersion 24 // 应用支持的最低Android版本 + targetSdkVersion 34 // 应用适配的目标Android版本 + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8532f3c --- /dev/null +++ b/gradle.properties @@ -0,0 +1,29 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true + +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official + +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..d7e29b8 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,17 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "LogCam" +include ':app' \ No newline at end of file