gpt4 book ai didi

java - 找不到参数的方法 applicationId() ?

转载 作者:行者123 更新时间:2023-12-02 10:23:04 25 4
gpt4 key购买 nike

我已尝试修复此错误,但我不知道我的情况的主要问题是什么。

我收到的错误是关于添加依赖项或依赖项的版本如果有解决方案请帮助:

我的gradle文件:

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}

task clean(type: Delete) {

delete rootProject.buildDir
}

app.gradle 文件是:

apply plugin: 'com.android.application'

android {

compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig
applicationId "me.ismashot.ibtassim"
minSdkVersion 15
targetSdkVersion 28
versionCode 59
versionName '4.6'
multiDexEnabled true
}

dexOptions {

jumboMode true
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

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
}

productFlavors {
}


dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.github.chrisbanes.photoview:library:1.2.3'
implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
implementation 'com.pkmmte.view:circularimageview:1.1'
implementation 'com.melnykov:floatingactionbutton:1.3.0'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-messaging:17.3.0'
implementation 'com.google.firebase:firebase-analytics:16.0.3'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'

implementation files('libs/YouTubeAndroidPlayerApi.jar')
}

apply plugin: 'com.google.gms.google-services'

有人可以帮我解决这个问题吗?

最佳答案

将缺少的 { 添加到您的 defaultConfig 中:

android {
...
defaultConfig {
applicationId "me.ismashot.ibtassim"
...
}
...
}

编辑:

要修复无法解析:play-services-basement,请确保在所有内容中将google()存储库放在jcenter()之前存储库 block :

repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
jcenter()
}

关于java - 找不到参数的方法 applicationId() ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54186119/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com