更改cordova项目的android目标(Changing the android target of a cordova project)
我是cordova开发的新手,我使用此命令创建了我的第一个cordova项目,如以下站点https://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html
cordova create hello com.example.hello HelloWorld
使用这些命令为项目添加平台后,
cd hello cordova platform add android
和命令行给出这些输出
Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.exampple.hell Name: helloWorld Android target: android-21 Copying template files... Project successfully created.
根据这个项目的Android目标是android-21但是在我的机器上安装了android SDK只有最高级别的android API级别19.所以当我将这些项目导入eclipse IDE以对项目进行进一步更改时它会在控制台上出错
Unable to resolve target 'android-21'
我将AndroidManifest.xml文件更改为
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
但仍然有问题。
我可以将平台添加到项目时将android目标更改为19,还是有另一种方法来修复此问题并使用android API级别19运行项目
i'm new to cordova development and i created my first cordova project using this command as in following site https://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html
cordova create hello com.example.hello HelloWorld
After used these commands to add a platform to project,
cd hello cordova platform add android
and command line gives these output
Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.exampple.hell Name: helloWorld Android target: android-21 Copying template files... Project successfully created.
according to this Android target of this project is android-21 but installed android SDK on my machine only has up to android API level 19. So when i import these project to eclipse IDE to make further changes to project it gives error on console
Unable to resolve target 'android-21'
I changed AndroidManifest.xml file as
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
but still have the problem.
can i change the android target to 19 when the platform is added to project or is there another way to fix this and run project with android API level 19
原文:
最满意答案
禁用该系列的鼠标跟踪并使用
tooltip.refresh(point)
和tooltip.hide
var i = -1; $('#show-tt').on('click', function() { var points = chart.series[0].points; chart.tooltip.hide(); chart.tooltip.refresh(points[++i % points.length]); }); var chart = Highcharts.chart('container', { series: [{ enableMouseTracking: false, data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] }] });
示例: http : //jsfiddle.net/sfty1xd7/
Disable mouse tracking for the series and use
tooltip.refresh(point)
andtooltip.hide
var i = -1; $('#show-tt').on('click', function() { var points = chart.series[0].points; chart.tooltip.hide(); chart.tooltip.refresh(points[++i % points.length]); }); var chart = Highcharts.chart('container', { series: [{ enableMouseTracking: false, data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] }] });
example: http://jsfiddle.net/sfty1xd7/
相关问答
更多-
您需要绑定jqplot数据highligh和unhighligh事件,获取要显示的数据并设置包含div title属性的图表。 以下代码以“x:y”格式显示标题,其中x是图例标签,y是值: var plot = $.jqplot('plotDivId',...); $("#plotDivId").bind('jqplotDataHighlight', function(ev, seriesIndex, pointIndex, data) { var $this = $(this ...
-
只需使用带有空值的title选项。 喜欢这个: callbacks: { title: function(tooltipItems, data) { return ''; }, label: function(tooltipItem, data) { var datasetLabel = ''; var label = data.labels[tooltipItem.index]; ...
-
Bokeh图表值工具提示显示多行的重复值(Bokeh chart value tooltips show duplicate values for multiple lines)[2024-01-26]
像这样改变HoverTools并检查它显示与他们的行相对应的不同值。 p.add_tools(HoverTool(tooltips=[("Column", " %s" % column), ("Day", "$x{%F}"), ("Weight in/out", "@y kg")], formatters ... -
jqPlot饼图工具提示(jqPlot Pie Chart Tooltips)[2022-09-18]
通过查看jqplot的问题 ,似乎已经有一些对此功能的请求,但它尚未实现。 基于这个问题如何在jqplot饼图上显示工具提示 ,您可以连接jqplotDataHighlight和jqplotDataUnhighlight事件: $("#chartId").bind('jqplotDataHighlight', function(ev, seriesIndex, pointIndex, data) { }); $("#chartId").bind('jqplotDataUnhighlight', fun ... -
在图表上的某个点上悬停时显示所有图表的工具提示(Tooltips displayed for all charts when hovering over a point on a chart)[2022-10-03]
我认为发生的事情是$tooltip变量包含所有图表的jquery数组。 所以当你做$tooltip.removeClass('tooltip-hidden'); 它会从所有这些类中移除这个类。 你需要一种方法来区分它们 - 我会建议这样的: $(document).on('mouseenter', '.ct-point', function() { var seriesName = $(this).closest('.ct-point').attr('ct:meta'), value = $ ... -
这可能被视为一个错误,它表示通过以下方式更改工具提示功能非常容易解决: var tooltip = new Tooltip( chart1, "default", { text : function(point) { console.debug(point); return "This is " + point.run.data[point.index]; } }); This could maybe be considered as a b ...
-
Google Visualization API堆积图表的工具提示?(Tooltips for a Google Visualization API stacked chart?)[2021-10-13]
刚刚找到了我自己的问题的答案,我会在这里写下来,以防其他人有同样的问题(并拯救其他人的麻烦)。 答案接近我所希望的: rows使用f为工具提示提供格式化值。 喜欢这个: rows: [{c:[{v: '1996'}, {v: 11, f: 17}, { v: 10, f: 16} ]}, Just found the answer to my own question, I'll write it up here in case anyone else has the same problem (and ... -
你的方式工作正常,但这是惯用的dc.js方法: chart.on('pretransition', function(chart) { chart.selectAll('g.row') .call(rowtip) .on('mouseover', rowtip.show) .on('mouseout', rowtip.hide); }); 渲染或重绘图表后会触发pretransition事件 。 chart.selectAll仅选择图表中的项目,以避 ...
-
Chart JS:始终在多数据集折线图中显示工具提示(Chart JS: Always show tooltips in a multi dataset line chart)[2023-07-19]
您需要控制tootip生成过程(即从Chart.js库中复制粘贴代码的相关部分:-)) 为多系列折线图自动显示工具提示(不悬停) 这是它的外观 只需更改这样的选项即可 var options = { showTooltips: true, onAnimationComplete: function () { for (var dataIndex = 0; dataIndex < this.datasets[0].points.length; dataIndex++) { ... -
禁用该系列的鼠标跟踪并使用tooltip.refresh(point)和tooltip.hide var i = -1; $('#show-tt').on('click', function() { var points = chart.series[0].points; chart.tooltip.hide(); chart.tooltip.refresh(points[++i % points.length]); }); var chart = Highcharts.chart( ...