出现这样的错误。
2 3 | Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-iid-interop/16.0.0/firebase-iid-interop-16.0.0.aar |
出现 API 错误,例如:
2 3 4 5 6 | "errors" : [ { "status" : 404, "message" :"Could not find resource" } ] } |
这是我的应用程序 gradle 文件。应用程序使用了 firebase-id。我根据程序更改了包名称,但同步失败。
在 Gradle 中,我包含了 "implementation \\'com.google.firebase:firebase-core:16.0.1\\'" 但不起作用
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | android { compileSdkVersion 25 buildToolsVersion '28.0.2' defaultConfig { applicationId"com.my.application" minSdkVersion 15 targetSdkVersion 25 versionCode 14 versionName"2.7" vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.12' implementation 'com.google.firebase:firebase-core:16.0.1' implementation 'com.google.android.gms:play-services-base:9.2.1' implementation 'com.google.android.gms:play-services-basement:9.2.1' implementation 'com.google.android.gms:play-services-safetynet:9.2.1' implementation 'com.google.android.gms:play-services-tasks:9.2.1' // implementation 'com.google.android.gms:play-services-safetynet:11.0.1' // ButterKnife implementation 'com.jakewharton:butterknife:8.8 annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' // Volley implementation 'com.android.volley:volley:1.1.0' implementation 'com.github.aakira:expandable-layout:1.4.2@aar' implementation 'com.android.support:appcompat-v7:25.3.1' implementation 'com.android.support:design:25.3.1' implementation 'com.android.support:cardview-v7:25.3.1' implementation 'com.android.support:recyclerview-v7:25.3.1' implementation 'com.android.support:support-v4:25.3.1' implementation 'com.android.support:support-vector-drawable:25.3.1' implementation 'com.google.android.gms:play-services-maps:9.2.1' implementation 'com.google.android.gms:play-services-places:9.2.1' implementation 'com.google.code.gson:gson:2.8.1' implementation 'com.balysv:material-ripple:1.0.2' implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'com.wdullaer:materialdatetimepicker:3.2.0' implementation 'com.mikhaellopez:circularimageview:3.0.2' implementation 'com.github.pchmn:MaterialChipsInput:1.0.5' implementation 'com.hootsuite.android:nachos:1.1.1' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.google.firebase:firebase-messaging:9.2.1' implementation 'com.squareup.retrofit2:retrofit:2.0.2' implementation 'com.squareup.retrofit2:converter-gson:2.0.2' implementation 'com.squareup.picasso:picasso:2.3.2' implementation 'com.nineoldandroids:library:2.4.0' implementation 'com.daimajia.slider:library:1.1.5@aar' implementation 'com.felipecsl:gifimageview:2.1.0' implementation 'commons-io:commons-io:2.4' implementation files('libs/YouTubeAndroidPlayerApi.jar') implementation 'com.paytm:pgplussdk:1.1.5' implementation 'com.sunfusheng:marqueeview:1.2.0' // library for user interface implementation 'com.squareup.okhttp3:logging-interceptor:3.3.1' // firebase ads library // implementation 'com.google.firebase:firebase-ads:9.2.1' implementation 'com.android.support:multidex:1.0.3' } apply plugin: 'com.google.gms.google-services' |
使用了依赖项的 Gradle 文件 "classpath \\'com.google.gms:google-services:4.0.1\\'"
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | buildscript { repositories { jcenter() mavenCentral() google() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' 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() mavenCentral() maven { url"https://jitpack.io" } google() } } task clean(type: Delete) { delete rootProject.buildDir } |
例如下载最新的 Gradle 软件包发行版 (gradle-2.11-all.zip)。
在 Android Studio 中加载您的项目,然后转到 File->Settings->Gradle。单击使用本地 Gradle 分发并将其指向您解压缩最新 Gradle 项目的文件夹。
重新启动您的项目。
例如下载最新的 Gradle 软件包发行版 (gradle-2.11-all.zip)。
在 Android Studio 中加载您的项目,然后转到 File->Settings->Gradle。单击使用本地 Gradle 分发并将其指向您解压缩最新 Gradle 项目的文件夹。
重新启动您的项目。
例如下载最新的 Gradle 软件包发行版 (gradle-2.11-all.zip)。
在 Android Studio 中加载您的项目,然后转到 File->Settings->Gradle。单击使用本地 Gradle 分发并将其指向您解压缩最新 Gradle 项目的文件夹。
重新启动您的项目。
例如下载最新的 Gradle 软件包发行版 (gradle-2.11-all.zip)。
在 Android Studio 中加载您的项目,然后转到 File->Settings->Gradle。单击使用本地 Gradle 分发并将其指向您解压缩最新 Gradle 项目的文件夹。
重新启动您的项目。
例如下载最新的 Gradle 软件包发行版 (gradle-2.11-all.zip)。
在 Android Studio 中加载您的项目,然后转到 File->Settings->Gradle。单击使用本地 Gradle 分发并将其指向您解压缩最新 Gradle 项目的文件夹。
重新启动您的项目。
对于具有离线功能的智能手机应用程序,我正在为Xml文件创建单向文本同步。我希望我的服务器将增量/差异(例如GNU差异补丁)发送到目标设备。这是计划:Time=0Server:hasversion_1ofXmlfile(~800kiB)Client:hasversion_1ofXmlfile(~800kiB)Time=1Server:hasversion_1andversion_2ofXmlfile(each~800kiB)computesdeltaoftheseversions(=patch)(~10kiB)sendspatchtoClient(~10kiBtransferred)Cl
我构建了两个需要相互通信和发送文件的Rails应用程序。例如,一个Rails应用程序会发送请求以查看其他应用程序数据库中的表。然后另一个应用程序将呈现该表的json并将其发回。我还希望一个应用程序将存储在其公共(public)目录中的文本文件发送到另一个应用程序的公共(public)目录。我从来没有做过这样的事情,所以我什至不知道从哪里开始。任何帮助,将不胜感激。谢谢! 最佳答案 无论Rails是什么,几乎所有Web应用程序都有您的要求,大多数现代Web应用程序都需要相互通信。但是有一个小小的理解需要你坚持下去,网站不应直接访问彼此
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
刚入门rails,开始慢慢理解。有人可以解释或给我一些关于在application_controller中编码的好处或时间和原因的想法吗?有哪些用例。您如何为Rails应用程序使用应用程序Controller?我不想在那里放太多代码,因为据我了解,每个请求都会调用此Controller。这是真的? 最佳答案 ApplicationController实际上是您应用程序中的每个其他Controller都将从中继承的类(尽管这不是强制性的)。我同意不要用太多代码弄乱它并保持干净整洁的态度,尽管在某些情况下ApplicationContr
我是一个Rails初学者,但我想从我的RailsView(html.haml文件)中查看Ruby变量的内容。我试图在ruby中打印出变量(认为它会在终端中出现),但没有得到任何结果。有什么建议吗?我知道Rails调试器,但更喜欢使用inspect来打印我的变量。 最佳答案 您可以在View中使用puts方法将信息输出到服务器控制台。您应该能够在View中的任何位置使用Haml执行以下操作:-puts@my_variable.inspect 关于ruby-on-rails-如何在我的R
我已经构建了一些serverspec代码来在多个主机上运行一组测试。问题是当任何测试失败时,测试会在当前主机停止。即使测试失败,我也希望它继续在所有主机上运行。Rakefile:namespace:specdotask:all=>hosts.map{|h|'spec:'+h.split('.')[0]}hosts.eachdo|host|begindesc"Runserverspecto#{host}"RSpec::Core::RakeTask.new(host)do|t|ENV['TARGET_HOST']=hostt.pattern="spec/cfengine3/*_spec.r
有没有办法在这个简单的get方法中添加超时选项?我正在使用法拉第3.3。Faraday.get(url)四处寻找,我只能先发起连接后应用超时选项,然后应用超时选项。或者有什么简单的方法?这就是我现在正在做的:conn=Faraday.newresponse=conn.getdo|req|req.urlurlreq.options.timeout=2#2secondsend 最佳答案 试试这个:conn=Faraday.newdo|conn|conn.options.timeout=20endresponse=conn.get(url
这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下
我有一个存储主机名的Ruby数组server_names。如果我打印出来,它看起来像这样:["hostname.abc.com","hostname2.abc.com","hostname3.abc.com"]相当标准。我想要做的是获取这些服务器的IP(可能将它们存储在另一个变量中)。看起来IPSocket类可以做到这一点,但我不确定如何使用IPSocket类遍历它。如果它只是尝试像这样打印出IP:server_names.eachdo|name|IPSocket::getaddress(name)pnameend它提示我没有提供服务器名称。这是语法问题还是我没有正确使用类?输出:ge
我想获取模块中定义的所有常量的值:moduleLettersA='apple'.freezeB='boy'.freezeendconstants给了我常量的名字:Letters.constants(false)#=>[:A,:B]如何获取它们的值的数组,即["apple","boy"]? 最佳答案 为了做到这一点,请使用mapLetters.constants(false).map&Letters.method(:const_get)这将返回["a","b"]第二种方式:Letters.constants(false).map{|c