{"id":38055711,"url":"https://github.com/daemon369/android-infrastructure-application","last_synced_at":"2026-01-16T20:24:24.412Z","repository":{"id":57732883,"uuid":"402693381","full_name":"daemon369/android-infrastructure-application","owner":"daemon369","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-05T05:47:13.000Z","size":231,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-08-02T07:40:00.781Z","etag":null,"topics":["android","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daemon369.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-03T08:03:12.000Z","updated_at":"2021-12-27T01:44:02.000Z","dependencies_parsed_at":"2022-09-26T22:11:12.029Z","dependency_job_id":null,"html_url":"https://github.com/daemon369/android-infrastructure-application","commit_stats":null,"previous_names":[],"tags_count":6,"template":null,"template_full_name":null,"purl":"pkg:github/daemon369/android-infrastructure-application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-infrastructure-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-infrastructure-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-infrastructure-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-infrastructure-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daemon369","download_url":"https://codeload.github.com/daemon369/android-infrastructure-application/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-infrastructure-application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","kotlin"],"created_at":"2026-01-16T20:24:24.207Z","updated_at":"2026-01-16T20:24:24.347Z","avatar_url":"https://github.com/daemon369.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# android-infrastructure-application\n\n## 添加依赖\n\n`build.gradle`文件中添加：\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation \"io.github.daemon369:android-infrastructure-application:1.3.0\"\n}\n```\n\n可以在\u003chttps://mvnrepository.com/artifact/io.github.daemon369/android-infrastructure-application\u003e查询最新版本\n\n## 问题\n\n如果遇到如下错误：\n\n    Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option\n    Adding support for Java 8 language features could solve this issue.\n\n解决方法：\n\n```gradle\n// build.gradle\nandroid {\n    // ...\n    compileOptions {\n        targetCompatibility JavaVersion.VERSION_1_8\n        sourceCompatibility JavaVersion.VERSION_1_8\n    }\n    kotlinOptions {\n        jvmTarget = \"1.8\"\n    }\n}\n```\n\n## 功能介绍\n\n通用`Application`实现，应用使用`InfrastructureApp`或其子类来作为自定义`Application`时，可以简化基础支持库的很多功能的使用\n\n### 使用\n\n#### 使用`AndroidManifest.xml`设置为默认`Application`实现：\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"me.daemon.infrastructure.application.demo\"\u003e\n\n    \u003capplication\n        android:name=\"me.daemon.infrastructure.application.InfrastructureApp\"\u003e\n        ...\n    \u003c/application\u003e\n\n\u003c/manifest\u003e\n```\n\n#### 使用自定义`Application`继承`me.daemon.infrastructure.application.InfrastructureApp`类\n\n```kotlin\npackage me.daemon.infrastructure.application.demo\n\nimport me.daemon.infrastructure.application.InfrastructureApp\n\nclass DemoApplication : InfrastructureApp() {\n}\n```\n\n#### 应用\n\n```kotlin\nfun getString(@StringRes strId: Int): String {\n    return application.getString(strId)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaemon369%2Fandroid-infrastructure-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaemon369%2Fandroid-infrastructure-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaemon369%2Fandroid-infrastructure-application/lists"}