无法在设备'emulator-5554'上安装* .apk:EOF(Failed to install *.apk on device 'emulator-5554': EOF)
我试图运行的项目设置为minSDK级别7.运行Android虚拟设备5554时,我有gottan以上错误消息。 (其他设备工作良好)。 它工作如此缓慢,花费太多时间让主屏幕甚至不运行。 最后,它给出了这个错误:
无法在设备'emulator-5554'上安装* .apk:EOF
我重新启动了我的电脑和Eclipse几次,以及干净的项目。 我也试过这个为什么Android模拟器这么慢? 我们如何加速Android模拟器? 得到它固定。 昨天,这运行得很好。 现在这么lug。
任何建议或帮助? 谢谢
The project I tried to run is set to minSDK level 7. I have gotten the above error message when running Android virtual device-5554(the other devices work well). It is working so slowly, and taking too much time to get home screen not even run. At the end, it gives this error :
Failed to install *.apk on device 'emulator-5554': EOF
I restarted my computer and Eclipse several times, as well as clean projects. I also tried this Why is the Android emulator so slow? How can we speed up the Android emulator? to get it fixed. Yesterday, it was working pretty well. Now it is so sluggish.
Any suggestion or help? Thank you
原文:https://stackoverflow.com/questions/6376722
最满意答案
正如安德烈亚斯所说,问题来自你的利用。
这不是你使用它的dom元素,在jQuery中,你必须先添加一个$所以它是$(this)来获取元素。
在您的情况下,由于这不是元素,因此next()函数不可用。
我更新了以下代码:
(function ( $ ) { $.fn.methodSlider = function(options) { var settings = $.extend({ speed:1000 },options); $(this).find('li:first').addClass('top'); var that = $(this); var change = function(){ var currSlider = that.find('li.top'); var nextSlider = currSlider.next(); nextSlider.addClass('top'); currSlider.removeClass('top'); } setInterval(change, settings.speed); return this; }; $('.res-slideshow').methodSlider({ speed:3000 }); }( jQuery ));
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="residence-slider"> <ul class="res-slideshow"> <li> <img src="img/site_images/home-01.jpg" alt="This is image 1"> </li> <li> <img src="img/site_images/home-02.jpg" alt="This is image 2"> </li> <li> <img src="img/site_images/home-03.jpg" alt="This is image 3"> </li> </ul> </div>
As Andreas said, the matter comes from your this utilisation.
This is not the dom element as you use it, in jQuery, you have to add a $ before so it's $(this) to get the element.
In your case, since this was not the element, the next() function wasn't available.
I updated your code below :
(function ( $ ) { $.fn.methodSlider = function(options) { var settings = $.extend({ speed:1000 },options); $(this).find('li:first').addClass('top'); var that = $(this); var change = function(){ var currSlider = that.find('li.top'); var nextSlider = currSlider.next(); nextSlider.addClass('top'); currSlider.removeClass('top'); } setInterval(change, settings.speed); return this; }; $('.res-slideshow').methodSlider({ speed:3000 }); }( jQuery ));
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="residence-slider"> <ul class="res-slideshow"> <li> <img src="img/site_images/home-01.jpg" alt="This is image 1"> </li> <li> <img src="img/site_images/home-02.jpg" alt="This is image 2"> </li> <li> <img src="img/site_images/home-03.jpg" alt="This is image 3"> </li> </ul> </div>
相关问答
更多-
正如安德烈亚斯所说,问题来自你的利用。 这不是你使用它的dom元素,在jQuery中,你必须先添加一个$所以它是$(this)来获取元素。 在您的情况下,由于这不是元素,因此next()函数不可用。 我更新了以下代码: (function ( $ ) { $.fn.methodSlider = function(options) { var settings = $.extend({ speed:1000 },options); $(this).fi ...
-
当您在aColumns上运行循环时,您需要将它指定为options.aColumns,因为它现在是选项对象的属性。 你需要访问任何属性作为选项传递给父对象,这是你的情况下的选项对象。 https://learn.jquery.com/plugins/basic-plugin-creation/#accepting-options (function ($) { $.fn.Table = function (options) { var options = $.fn.extend({ ...
-
你应该做什么用.data()将数据存储在相关的DOM元素上。 像这样的东西: var first; var second; $(document).ready(function(){ first = $("#clicker1").data('count',0); second = $("#clicker2").data('count',0); }); $(document).on('click','.clicker', function(){ $(this).data('count ...
-
rviz无法识别我的插件(rviz does not recognize my plugin)[2022-03-12]
我在这里犯了新人的错误。 我做了两件事来解决我的问题,然后才意识到只需要一件。 1)安装了rviz源并构建它。 在这样做并执行'rosrun rviz rviz'后,问题依然存在。 没有新的插件。 2)意识到我没有为这个工作区找到devel / setup.bash。 这样做,然后运行rviz产生了预期的结果。 我回去从src中删除rviz,并删除了devel文件夹,并且它仍然工作,所以似乎没有必要使用从源代码构建的rviz。 Rookie mistakes being made here by me. I ... -
Eclipse在安装lua插件后不识别lua文件(Eclipse doesn't recognize lua files after installing the lua plugin)[2022-05-25]
听起来像你的文件类型没有关联。 点击Window / Preferences并选择General / Editors / File Associations。 Sounds like your file types aren't associated. Click on Window/Preferences and select General/Editors/File Associations. -
你不需要传递一个函数给插件,你需要传递一个对象: $('.inputBox').validate({ rounded: true }); You don't need to pass a function to the plugin, you need to pass an object: $('.inputBox').validate({ rounded: true });
-
WordPress Active Directory插件 - 无法识别组(WordPress Active Directory Plugin - Can't Recognize Groups)[2022-09-03]
我最近使用Active Directory集成插件时遇到了困难。 在我的情况下,我需要修改插件从LDAP中选择用户的方式,因为即使它会登录,它也无法根据组进行身份验证。 我发布了该插件的修改版本,以便您可以看到我更改了链接到文件的内容。 I recently had difficulty working with the Active Directory Integration plugin. In my case I needed to modify the way the plugin selected ... -
在动态添加类时,请使用jQuery事件委派 $(document).on('click' , '.container__card--hover', function(){ $(this).toggleClass('container__card--selected container__card--hover'); }); 工作片段: - $('.container__card').hover(function(){ $(this).toggleClass('container__card ...
-
jQuery Tokeninput无法识别单词的首字母(jQuery Tokeninput doesn't recognize first letters of a word)[2021-07-27]
我得到了它的工作,但我不知道为什么。 基本上,我用preg_match切换了strpos。 现在它有效。 I got it to work but I don't know why. Basically, I switched the strpos with a preg_match. Now it works. -
这是我发现的: jQuery.extend(jQuery.validator.messages, { required: 'bla bla bla', remote: 'bla bla bla' }); Here is what I found : jQuery.extend(jQuery.validator.messages, { required: 'bla bla bla', remote: 'bla bla bla' ...