当前位置: 首页 > 知识库问答 >
问题:

类无法访问FirebaseInstanceId.zzju(java.lang.String)'

巫马翰翮
2023-03-14

我的应用程序中有这样一个错误:

----分级码

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId 'com.momentstel.vivawehdat'
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 4
        versionName "1.2.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:25.3.0'
    compile 'com.android.support:design:25.3.0'
    compile 'com.github.armcha:LuseenBottomNavigation:1.6.1'
    compile 'com.android.support:support-v4:25.3.0'
    compile 'com.android.support:recyclerview-v7:25.3.0'
    compile 'com.android.support:cardview-v7:25.3.0'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.nineoldandroids:library:2.4.0'
    compile "com.google.android.gms:play-services-gcm:10.2.0"
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.firebase:firebase-messaging:9.2.0'
    compile 'com.google.android.gms:play-services-ads:10.2.0'
    compile 'com.google.android.gms:play-services-auth:10.2.0'
    compile 'com.google.android.gms:play-services-gcm:10.2.0'
    compile 'com.google.firebase:firebase-crash:9.2.1'
    compile 'com.google.firebase:firebase-analytics:9.2.0'
    compile 'ayar.oktay.library:advancedtextview:0.4.1'
    compile 'com.google.firebase:firebase-core:10.2.0'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

----在Splacescreen

 getInstance().subscribeToTopic("news");
    String msg = "Thank about your Support";

    String token = FirebaseInstanceId.getInstance().getToken();

共有1个答案

景令秋
2023-03-14

您的问题是您有不同版本的Firebase/Google Play服务依赖关系。在Gradle文件的以下行中使用最新版本(当前为10.2.0):

compile "com.google.android.gms:play-services-gcm:10.2.0"
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.android.gms:play-services-ads:10.2.0'
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.android.gms:play-services-gcm:10.2.0'
compile 'com.google.firebase:firebase-crash:10.2.0'
compile 'com.google.firebase:firebase-analytics:10.2.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
 类似资料:
  • 由于某种原因,我有一个LinkedList类无法访问我的学生类方法。我不明白为什么会发生这种情况,因为我的linkedlist类是Student类型。我一直收到一个错误:找不到symbol symbol:method getName()位置:Student类型的变量数据,其中Student是一个类型变量:Student extends对象在类节点中声明。下面的方法来自我的链表类 getGpa是我的

  • 如果有人能帮忙,那就太好了!

  • 问题内容: 当我尝试在IntelliJ中创建项目时,在此行上收到以下错误: 错误: 是实现 接口* 的类 * 所有软件包都存在,我可以跳转到每个接口或类的声明,但是我不知道为什么IntellJ说它无法访问或找到它们?但是是接口而不是类 上面的声明位于一个名为jar的jar文件中,并且存在于Project图书馆员中。 问题答案: 该项目包含几个模块。在将库添加到项目库后,某些模块在其依赖项中缺少它。

  • 问题内容: 我真的很想用Struts2来解决问题- 通过省略部分路径,我可以访问JSP页面。请注意该路径应该包括在内。关键是要看路径中的单词。 这是文件: 我可以通过: 和通过: 请注意,在两个URL中,我都可以删除,为什么? 来源:http: //www.mkyong.com/misc/how-to-use-mkyong- tutorial/ 有人可以看完上面的教程,告诉我怎么了吗? 问题答案:

  • 我无法访问 尝试的网址:localhost/htdocs 本地主机:80/htdocs IP: 80/htdocs 总是同样的错误 错误: 未找到对象! 在此服务器上找不到请求的URL。如果您手动输入URL,请检查拼写并重试。 如果您认为这是服务器错误,请联系网站管理员。 所有服务都正常运行我正在使用端口:80 我查看了apacheconf: 这是根医生 DocumentRoot:您将在其中提供文

  • 我正在用log4j2创建Spring-Boot应用程序。我使用的库是:https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api/2.11.1 https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core/2.11.1 在这些JAR中找不到