android - 无法修复 gradle 同步问题
问题描述
在构建项目时出现此错误
没有缓存版本的 com.android.tools.build:aapt2:3.5.2-5435860 可用于离线模式。
这是我的毕业文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
// android.enforceUniquePackageName = false
defaultConfig {
applicationId "com.miride"
minSdkVersion 19
targetSdkVersion 28
multiDexEnabled true
versionCode 71
versionName "5.1.0.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
// signingConfig signingConfigs.release
}
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
implementation fileTree(include: '*.jar', dir: 'libs')
annotationProcessor files('libs/pubnub-gson-4.19.0-all.jar')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.stripe:stripe-android:7.1.0'
implementation 'com.urbanairship.android:urbanairship-fcm:9.1.0'
implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.2.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.34.0'
implementation 'io.card:android-sdk:5.5.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'org.droidparts:droidparts:2.9.8'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'se.emilsjolander:stickylistheaders:2.7.0'
implementation 'ch.acra:acra:4.9.0'
implementation 'com.wefika:flowlayout:0.4.1'
implementation 'org.jsoup:jsoup:1.11.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2'
implementation files('libs/mpointsdk.aar')
implementation files('libs/basesdk.aar')
implementation files('libs/mProfileSDK.aar')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
apply plugin: 'com.google.gms.google-services'
我已经尝试了所有可能的解决方案,但无法摆脱这个错误。如果有人有任何解决方案或建议,请发布。
解决方案
它显示您的 android 工作室无法连接互联网。
推荐阅读
- java - 爪哇。计算正确的变化
- apache-spark - 如果作业花费的时间比预期的长,则终止 Spark 作业或终止 EMR 集群
- angular - 选择选项并在其他下拉菜单中禁用相同的选项
- afp - 如何在 C# 或 Java 中获取 AFP 文件的页数
- python - 更改python中的字典字典
- c# - 如何在活动中调用 Owin StartUp?
- c - 文件夹内的xcode c文件未执行
- c# - 在响应 302 的位置注销重定向 URI 后丢失
- python - 解密后的令牌不包含任何东西,Python
- python - 即使在名称冲突的情况下,pip 也可以从 PyPi 上的私有索引中选择包?