小米便签开源社区版从0到1维护教程 1.前置条件-------软件的安装: 开发工具:Android studio 下载Android studio 汉化教程 安装请自行解决 SDK版本以及相关文件
下载完成后的文件结构:
Could not find com.android.tools.build:gradle:7.4.2.Searched in the following locations:https://jcenter.bintray.com/com/android/tools/build/gradle/7.4.2/gradle-7.4.2.pomIf the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' fORMat, you need to adjust the 'metadataSources { ... }' of the repository declaration.Required by:project :Add Google Maven repository and sync projectOpen File
build.gradle(Project:Notes)
文件中添加 Google Maven 仓库。你可以在 repositories
块中添加以下代码: maven { url 'Https://dl.google.com/android/maven2' }
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { maven { url 'https://dl.google.com/android/maven2' } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' }}allprojects { repositories { jcenter() }}
A problem occurred configuring root project 'Notes'.Could not resolve all files for configuration ':classpath'.Could not download Kotlin-stdlib-common-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10)> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10.jar'.> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10.jar'.> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties> Remote host terminated the handshake
build.gradle(Project:Notes)
文件中,你可以添加以下代码来使用 Maven 中央仓库:repositories { mavenCentral()}
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { mavenCentral() maven { url 'https://dl.google.com/android/maven2' } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' }}allprojects { repositories { jcenter() }}
Execution failed for task ':app:mergeDebugResources'.A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnableCould not isolate value com.android.build.gradle.internal.res.Aapt2CompileRunnable$Params_Decorated@7e8ac076 of type Aapt2CompileRunnable.Params> Could not resolve all files for configuration ':app:detachedConfiguration2'.> Could not find com.android.tools.build:aapt2:7.4.2-8841542.Searched in the following locations:- https://jcenter.bintray.com/com/android/tools/build/aapt2/7.4.2-8841542/aapt2-7.4.2-8841542.pomIf the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.Required by:project :app
google()
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { mavenCentral() maven { url 'https://dl.google.com/android/maven2' } google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' }}allprojects { repositories { google() jcenter() }}
org.apache.http
包已经被废弃,不再推荐在 Android 应用程序中使用,但是我们可以对这个这个包做一个兼容:在build.gradle(Module: App)里面添加 useLibrary 'org.apache.http.legacy'
apply plugin: 'com.android.application'android { compileSdkVersion 33 buildToolsVersion "33.0.2" defaultConfig { applicationId "net.micode.notes" minSdkVersion 14 targetSdkVersion 33 useLibrary 'org.apache.http.legacy' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } }}
// notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content,// pendingIntent); notification.contentIntent = pendingIntent; mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, notification);
android:exported
属性,以确保该组件只能被期望的应用程序或系统组件调用。如果没有指定 android:exported
属性,系统将会认为该组件是公开的,从而可能导致安全漏洞。为了解决这个问题,我们依次在报错的地方加上android:exported="true"
android:exported="false"
元素缺少 URI 属性所致。
元素用于指定 Intent 的数据 URI,如果你在
元素中指定了数据类型(如 android:mimeType
属性),则还必须指定数据 URI。如果没有指定数据 URI,系统将会认为数据缺失,从而导致 “Missing URL” 错误。<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/text_note" android:scheme="content" android:host="com.example.notes.provider" android:path="/notes" /> <data android:mimeType="vnd.android.cursor.item/call_note" android:scheme="content" android:host="com.example.notes.provider" android:path="/notes" /></intent-filter>
点击下载
提取码:v6qd
链接:https://pan.xunlei.com/s/VNVEyleS4tQUNft2-DTE7x30A1
提取码:v6qd
来源地址:https://blog.csdn.net/m0_68761369/article/details/130648473
--结束END--
本文标题: 小米便签从0到1维护教程
本文链接: https://lsjlt.com/news/414897.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0