解决Failure [INSTALL_FAILED_TEST_ONLY]

转载:更正-INSTALL_FAILED_TEST_ONLY真正原因 http://blog.sina.com.cn/s/blog_6cbd24890102x0ki.html


Note: The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug variant and click Build > Build APK(s).

也就是说,只要在AndroidStudio3.0内,点击绿三角运行Run,跑出来的apk,一定是TEST_ONLY的。

问题解决,以后给测试妹妹出apk,不能直接用Run出来的了,必须跑一下Build Apks。


阅读更多

关于 Communications link failure解决

10-24

rn这个项目是基于SSH 框架,数据库是MYSQL ,服务器是TOMCAT,部署完成后,经过一段时间(估计约8小时,但不确定),当再次访问该项目,即:当与数据库再次连接时,就报下面这个异常,请各位帮忙分析解决,高分酬谢!rnrn[code=Java]rn23:02:28,445 ERROR JDBCTransaction:67 - JDBC begin failedrncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnLast packet sent to the server was 31 ms ago.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)rn at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)rn at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4916)rn at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)rn at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)rn at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)rn at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)rn at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:510)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)rn at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)rn at $Proxy26.findUserByUserNameAndPassword(Unknown Source)rn at com.lenovo.mfgot.action.login.LoginAction.execute(LoginAction.java:56)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)rn[/code]rnrnapplicationContext_common.xml 部分如下:rn[code=XML]rn..........省略部分........rnrn rn rn rn rn rn rn rn rn rn rn rn rn..........省略部分........rn[/code]

没有更多推荐了,返回首页