我的WebView
Android 4.x设备上有一个问题.
Android应用有一个包含片段的Tabhost.其中一个片段包含webview.显示的页面有一个下拉菜单,如下所示:
<select id="mySelect" name="mySelect">
<option value="1">Testname 1</option>
<option value="2">Testname 2</option>
<option value="3">Testname 3</option>
</select>
Run Code Online (Sandbox Code Playgroud)
现在,当我使用带有Android 4.1.1的Galaxy S3(或任何其他Android设备,我可以开始使用)打开我的应用程序时,我可以选择"Testname 1",然后选择"Testname 2",依此类推.
在Galaxy Nexus上(在运行Android 4.1.1,4.1.2和4.2的不同设备上确认)当我尝试选择UI时阻止的东西.在我切换到另一个选项卡并突然返回到webview选项卡后,UI最终更改为先前选择的项目.
知道是什么导致了这个或如何为Galaxy Nexus解决这个问题?
重要更新:
我可以追踪到这一点Tabhost
.当webview
它在tabhost
它不起作用时,它不起作用.这可能与此问题有关.
我们有一个很大的git存储库,我想将其推送到一个自托管的gitlab实例。
问题是gitlab遥控器不允许我推送我的仓库:
git push --mirror https://mygitlab/xy/myrepo.git
Run Code Online (Sandbox Code Playgroud)
这会给我这个错误:
Enumerating objects: 1383567, done.
Counting objects: 100% (1383567/1383567), done.
Delta compression using up to 8 threads
Compressing objects: 100% (207614/207614), done.
remote: error: object c05ac7f76dcd3e8fb3b7faf7aab9b7a855647867:
duplicateEntries: contains duplicate file entries
remote: fatal: fsck error in packed object
Run Code Online (Sandbox Code Playgroud)
所以我做了一个git fsck:
error in tree c05ac7f76dcd3e8fb3b7faf7aab9b7a855647867: duplicateEntries: contains duplicate file entries
error in tree 0d7286cedf43c65e1ce9f69b74baaf0ca2b73e2b: duplicateEntries: contains duplicate file entries
error in tree 7f14e6474400417d11dfd5eba89b8370c67aad3a: duplicateEntries: contains duplicate file entries
Run Code Online (Sandbox Code Playgroud)
我要做的下一件事是检查git ls-tree c05ac7f76dcd3e8fb3b7faf7aab9b7a855647867
:
100644 blob …
Run Code Online (Sandbox Code Playgroud) 当我锁定计算机或启动另一个 Visual Studio 实例时,我遇到了 Visual Studio 2013 崩溃的问题。我使用应用了最新补丁的 Visual Studio 2013。我总是以管理员身份启动 Visual Studio。
这似乎只有在某个大解决方案中才会发生。我用其他解决方案没有出现这个问题。
我尝试删除解决方案并从 TFS 进行干净的结帐,但 Visual Studio 仍然崩溃。
我知道这不是很多信息,但是您知道如何解决此问题或我还能检查什么吗?
附加信息:即使在全新的 Windows 8.1 安装上使用 Visual Studio 2015,这种情况仍然会发生...
这是错误:
Spring组件扫描似乎没有用.我使用的是Spring 3.1和tomcat 7.0.
这就是我的applicationContext.xml的样子:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
<context:annotation-config/>
<context:component-scan base-package="com.abc"/>
<bean id="myBean" class="com.efg.test.MyBean" />
</beans>
Run Code Online (Sandbox Code Playgroud)
我有一个这样的课:
package com.abc.test
@Component
class Test {
@Autowired
private static MyBean myBean;
public static MyBean getMyBean() { return myBean; }
public static void setMyBean(MyBean bean) { myBean = bean; }
}
Run Code Online (Sandbox Code Playgroud)
我原以为Spring会在启动web应用程序时初始化Test,而myBean会自动注入,所以如果我调用任何(静态)Test方法,我对myBean的引用都是空的.
但是,myBean不会被注入并且始终为null(myBean本身被初始化为singleton,它不会被注入).要做到这一点,我还需要做些什么?如果我将Test-class添加到applicationContext.xml,一切正常.我的猜测是Spring没有初始化Test,因此没有连线.
更新: 我需要能够从静态上下文访问自动连接字段(此类的方法被称为JSP函数),因此它必须是静态的.
我有一个问题,因为android 4.2与proguard.
基本上我在webview上使用JavascriptInterface,如下所示:
public class MyJavascriptInterface {
public void doSomething() { ... }
}
Run Code Online (Sandbox Code Playgroud)
现在我所理解的是,当proguard对代码进行模糊处理时,它会重命名类名和方法名,因此无法再从Javascript中调用它.这就是为什么我必须将它添加到proguard配置:
-keepclassmembers class mypackage.MyJavascriptInterface {
public void doSomething();
}
Run Code Online (Sandbox Code Playgroud)
当我将目标sdk设置为17(Android 4.2)时,@JavascriptInterface
出于安全原因,我必须将注释添加到我的Javascript接口方法中:
@JavascriptInterface
public class MyJavascriptInterface {
public void doSomething() { ... }
}
Run Code Online (Sandbox Code Playgroud)
现在的问题是,如果启用了proguard,则这不再起作用(doSomething不会被调用,就像在混淆步骤中仍然重命名了类一样).如果我禁用proguard代码工作正常.
如何使用目标sdk 17进行此操作?