[英]Error occurred when configuring project ':app' (org.gradle.api.ProjectConfigurationException) and ERROR ASCII also found
I was trying to build my project and I got some errors in the project's gradle file specifically the build.gradle(app) file.我正在尝试构建我的项目,但在项目的 gradle 文件特别是 build.gradle(app) 文件中出现了一些错误。 When trying to build the project, I got the following errors:
尝试构建项目时,出现以下错误:
1) org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app' 1) org.gradle.api.ProjectConfigurationException:配置项目':app'时出现问题
2) ERROR: ASCII also found 2)错误:也发现了 ASCII
Also, I can't view my UI designs.另外,我无法查看我的 UI 设计。 I have been battling with this error for a few days and I really need help getting it fixed.
几天来我一直在与这个错误作斗争,我真的需要帮助来修复它。 This is my build.gradle(app) file:
这是我的 build.gradle(app) 文件:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.onebookingsystem.obs"
minSdkVersion 23
targetSdkVersion 26
versionCode 16
versionName "1.1.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
apply plugin: 'com.google.gms.google-services'
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.payumoney.sdkui:plug-n-play:1.0.0') {
transitive = true;
exclude module: 'payumoney-sdk'
}
compile 'com.android.support.constraint:constraint-layout:1.0.2'
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support:design:26.+'
compile 'com.jjoe64:graphview:4.2.1'
compile 'com.prolificinteractive:material-calendarview:1.4.3'
compile 'de.hdodenhof:circleimageview:2.1.0'
// compile 'com.matthew-tamlin:sliding-intro-screen:3.2.0'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.squareup.picasso:picasso:2.3.2'
// compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile 'com.payumoney.core:payumoney-sdk:7.0.1'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.github.clans:fab:1.6.2'
compile 'com.android.support:cardview-v7:26.1.0'
//firebase
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-config:11.0.4'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.crashlytics.sdk.android:crashlytics:2.9.1'
compile 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-firestore:21.3.0'
//sms verify catcher
// compile 'com.github.stfalcon:smsverifycatcher:0.3.2'
// compile 'com.twilio:client-android:1.2.21'
//spinner design
// compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.github.PhilJay:MPAndroidChart:v2.0.9'
compile 'com.google.android.gms:play-services:11.0.4'
testCompile 'junit:junit:4.12'
}
}
apply plugin: 'com.google.gms.google-services'
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.配置“编译”已过时,已替换为“实施”和“API”。 You would need to change all to implementation example
您需要将所有内容更改为实施示例
androidTestImplementation ('com.android.support.test.espresso:espresso-core:2.2.2',)
next you will need to update your app dependencies to and your build tools api 28 or later.接下来,您需要将应用程序依赖项和构建工具更新为 api 28 或更高版本。 I noticed you're using different versions of firebase which will definitely crash your app.
我注意到您使用的是不同版本的 firebase,这肯定会使您的应用程序崩溃。
Also, I can't view my UI designs.
另外,我无法查看我的 UI 设计。
The latest firebase dependencies are on androidX, you need to migrate your project to androidX.最新的 firebase 依赖在 androidX,你需要将你的项目迁移到 androidX。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.