我在此路径上成功创建了一个带有ripple仿真器的文件:
fullPath: "/myAppFolder/myFile.txt"
Run Code Online (Sandbox Code Playgroud)
这是代码:
filesystem.root.getDirectory(
"myAppFolder",
{ create: true, exclusive: false },
function(dir) {
dir.getFile(
"myFile.txt",
{ create: true, exclusive: true },
function(file) {
console.log(file);
},
function(error) {
console.log("error create file: " + error.code + ":" + error.message);
}
);
},
function(error) {
console.log("error create dir: " + error.code + ":" + error.message);
}
);
Run Code Online (Sandbox Code Playgroud)
另外我在哪里可以看到这个文件?它在硬盘上吗?
我的Xml代码:
<Button
android:id="@+id/link_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/google_btn" />
Run Code Online (Sandbox Code Playgroud)
我正在应用默认涟漪效应
<Button
android:id="@+id/link_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" />
Run Code Online (Sandbox Code Playgroud)
但我需要按钮的背景"@drawable/google_btn"
用
"?android:attr/selectableItemBackground"
.这意味着我需要自定义背景的涟漪效果.
我试图通过包含一个模块来覆盖动态生成的方法.
在下面的示例中,Ripple关联rows=
向Table 添加方法.我想调用那个方法,但之后还要做一些额外的事情.
我创建了一个模块来覆盖该方法,认为模块row=
可以调用super
以使用现有方法.
class Table
# Ripple association - creates rows= method
many :rows, :class_name => Table::Row
# Hacky first attempt to use the dynamically-created
# method and also do additional stuff - I would actually
# move this code elsewhere if it worked
module RowNormalizer
def rows=(*args)
rows = super
rows.map!(&:normalize_prior_year)
end
end
include RowNormalizer
end
Run Code Online (Sandbox Code Playgroud)
但是,我的新rows=
内容从未被调用,事实证明,如果我在其中引发异常,则不会发生任何事情.
我知道该模块已被包含在内,因为如果我把它放入其中,我的异常会被提升.
included do
raise 'I got included, woo!'
end
Run Code Online (Sandbox Code Playgroud)
此外,如果代替rows=
模块定义somethingelse= …
我正在尝试使用ripple模拟器运行facebook插件"SIMPLE示例".
我已经包含了facebook_js_sdk.js和cdv_plgin.js以及cardova.js.
config.xml如下.
<plugin name="org.apache.cordova.facebook.Connect value="org.apache.cordova.facebook.ConnectPlugin"/>
<gap:plugin name="FacebookConnect">
<param name="APP_ID" value="xxx" />
<param name="APP_NAME" value="app" />
</gap:plugin>
Run Code Online (Sandbox Code Playgroud)
我收到了错误
org.apache.cordova.facebook.Connect.getLoginStatus
我们似乎缺少一些东西:(
虽然你可以填写textarea来将json对象传递给你想要执行的回调,但有点酷
谢谢.
我无法使用安装在默认位置的SDK来构建Ripple.我收到错误消息"哦Snap!构建请求失败并显示消息:./ Appliclications/BlackBerry/BB10 WebWorks SDK 2.0.0.54不是有效路径"(编辑:此问题已通过删除'.'而得到修复 - 请稍等错误如下) - 但这是安装SDK的地方.
我在这里遵循这个教程:http://www.patrickcatanzariti.com/2013/01/my-guide-to-developing-a-blackberry-html5-webworks-mobile-app/
但我没有成功.我还尝试将./Documents/Virtual Machines中的BlackBerry10Simulator-BB10_2_0X-1791文件夹复制到该文件夹中,在尝试构建时仍然遇到相同的错误,以及编辑设置时出现的另一个错误:"找不到模拟器"
有没有人使用这个版本的Ripple和BB10?
编辑
我已将平台更改为BlackBerry 10 Webworks.现在错误出现在命令行上:
检查输出路径/用户/用户名/开发/ BlackBerry/BB_Output/
路径已存在
运行zip in/Users/username/Development/BlackBerry/Blackberry/BlackBerry
exec - "zip"-r"/ Users/username/Development/BlackBerry/BB_Output /Output.zip"*
out:添加:BlackBerry.zip
out :(存储0%)
添加:config.xml(收缩63%)
添加:css /(存储0%)
添加:css/app.css(收缩82%) )
添加:images /(存储0%)
添加:images/image1.png
输出:(缩小0%)
添加:images/Image3.png
输出:(存储0%)
添加:images/smallImage.png
输出:(存储0) %)
添加:images/Thumbs.db
out :(收缩28%)
添加:js/
out :(存储0%)
添加:js/jquery-1.10.2.min.js
out :(收缩65%)
添加:js /jquery.soap.js
out :( 缩减69%)
添加:js/msisdn.js
out :(收缩66%)
添加:js/panic.js …
我是Ripple的新手.我的问题是当我导入一个新项目并尝试使用ripple时,我在命令提示符中收到以下错误:
INFO: Server instance running on:http://localhost:4400
INFO: CORS XHR Proxy Service on: http://localhost:4400/ripple/xhr_proxy
INFO:JSONP XHR Proxy Service on: http://localhost:4400/ripple/jsonp_xhr_proxy
INFO: Could not find cordova as a local module.Expecting to find it installed Globally
Run Code Online (Sandbox Code Playgroud)
我通过命令行使用Ripple.当我在命令行中创建一个新项目时,我能够使用Ripple,但是当我尝试在新工作区中导入一个新项目并尝试使用波纹时,我收到上述错误消息..请建议做什么..请帮助....
调试器错误"无法附加.系统无法找到"从Ripple和Android模拟器中指定的文件"
我刚刚为Visual Studio 2013安装了多设备混合应用程序预览版,在尝试针对Ripple或其他模拟器进行调试时出现错误
构建过程始终成功完成,但在开始调试VS时显示此错误消息:
"无法附上.该系统找不到指定的文件"
Visual Studio 2013没有提供有用的输出,而是在显示异常后调试器没有附加到浏览器Ripple模拟器.异常立即发生,调试器永远不会附加.自安装以来我发生了这个错误,所以它不应该与项目本身有任何关系.我检查了我的路径,看起来像@ Freddy的回答一样正确,因为构建总是成功的.
debugging android-emulator ripple visual-studio-2013 visual-studio-cordova
您好我的问题是使用Visual Studio工具开发HTML5中的phonegap应用程序,用于apache cordova https://www.visualstudio.com/en-us/features/cordova-vs.aspx 当我调试应用程序时出错
Ripple ::环境变暖(茶.伯爵灰色.热.)ripple.js(37,13099)
主线程上的同步XMLHttpRequest因其对最终用户体验的不利影响而被弃用.如需更多帮助,请查看http://xhr.spec.whatwg.org/.> ripple.js(50,28958)
无法加载资源:服务器响应状态为404(未找到)ripple.js
感谢您的帮助
在处理多设备混合应用程序时,我遇到了Visual Studio的问题.当我尝试对外部Web服务进行ajax调用时,会出现一些错误.(跨域安全问题).部署到移动设备时,我的代码工作正常.
从研究中我发现了以下内容:
Ripple有自己的代理设置
我发现了更多信息,Chrome可以在没有Web安全模式下启动,在运行时通过命令行开关.
我正在使用 aMaterialButton
并且我需要它来产生无边界的涟漪效果。
我试过设置无边界波纹, android:background="attr/selectableItemBackgroundBorderless"
但没有运气。看起来MaterialButton
它的背景和波纹分离了。我检查了来源,我看到在 MaterialButtonHelper 类中设置了可绘制的波纹。我无法rippleDrawable
通过 MaterialButton进行覆盖。
有没有办法使用具有无边界波纹的 MaterialButton?