在同步我的项目时,我遇到了多个"无法解决"问题.他们都是火力架和游戏服务相关的.我确定它们都是一样的(11.2.0).我也检查过,两者的最新版本是11.2.0.此外,类似问题的所有其他答案都涉及在SDK Manager中更新Google Play服务和存储库,但我的已经是最新的.
知道为什么我无法同步我的项目吗?
编辑 - 当前的工作解决方案
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.google.firebase:firebase-plugins:1.0.4'
// 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" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud) android firebase google-play-services android-studio android-gradle-plugin
所以,请耐心等待,因为我对Django,Python和Web开发非常陌生.我想要做的是显示我使用matplotlib制作的图表.我让它工作到主页自动重定向到图形的png(基本上是浏览器中显示图形的选项卡).但是,现在我想要的是看到实际的主页与图形简单嵌入.换句话说,我想看到导航栏等,然后是网站正文中的图形.
到目前为止,我已经搜索过,而且我对如何实现这一目标有所了解.我在想的是有一个只返回图形的特殊视图.然后,以某种方式从我的模板中的img src标签访问此png图像,我将用它来显示我的数据.
图形代码:
from django.shortcuts import render
import urllib
import json
from django.http import HttpResponse
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
import datetime as dt
import pdb
def index(request):
stock_price_url = 'https://www.quandl.com/api/v3/datatables/WIKI/PRICES.json?ticker=GOOGL&date.gte=20151101&qopts.columns=date,close&api_key=KEY'
date = []
price = []
#pdb.set_trace()
source_code = urllib.request.urlopen(stock_price_url).read().decode()
json_root = json.loads(source_code)
json_datatable = json_root["datatable"]
json_data = json_datatable["data"]
for day in json_data:
date.append(dt.datetime.strptime(day[0], '%Y-%m-%d'))
price.append(day[1])
fig=Figure()
ax = fig.add_subplot(1,1,1)
ax.plot(date, price, '-')
ax.set_xlabel('Date')
ax.set_ylabel('Price')
ax.set_title("Google Stock")
canvas = FigureCanvas(fig)
response = HttpResponse(content_type='image/png') …Run Code Online (Sandbox Code Playgroud)