首页 文章 精选 留言 我的

精选列表

搜索[android],共10000篇文章
优秀的个人博客,低调大师

【Android错误集锦】Could not resolve net.qiujuer.genius:kit-handler:latest.i...

Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not resolve net.qiujuer.genius:kit-reflect:latest.integration. Required by: project :app > net.qiujuer.common:okhttp:3.0.0 > Could not resolve net.qiujuer.genius:kit-reflect:latest.integration. > Failed to list versions for net.qiujuer.genius:kit-reflect. > Unable to load Maven meta-data from https://jcenter.bintray.com/net/qiujuer/genius/kit-reflect/maven-metadata.xml. > Could not GET 'https://jcenter.bintray.com/net/qiujuer/genius/kit-reflect/maven-metadata.xml'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > Could not resolve net.qiujuer.genius:kit-handler:latest.integration. Required by: project :app > net.qiujuer.common:okhttp:3.0.0 > Could not resolve net.qiujuer.genius:kit-handler:latest.integration. > Failed to list versions for net.qiujuer.genius:kit-handler. > Unable to load Maven meta-data from https://jcenter.bintray.com/net/qiujuer/genius/kit-handler/maven-metadata.xml. > Could not GET 'https://jcenter.bintray.com/net/qiujuer/genius/kit-handler/maven-metadata.xml'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 解决方法:使用官方OKHTTP //网络请求依赖包 // compile 'net.qiujuer.common:okhttp:3.0.0' // compile 'com.squareup.okio:okio:1.7.0' compile 'com.squareup.okhttp3:okhttp:3.2.0' compile 'com.google.code.gson:gson:2.7'

优秀的个人博客,低调大师

Android笔记:Fragment与Activity之间的交互,onAttach,退出最后一个 fragment

一、交互代码笔记: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 private LoginFragmentListener mListener; @Override public void onAttach(Activity activity) { super .onAttach(activity); try { mListener = (LoginFragmentListener) activity; } catch (ClassCastException e) { // throw new ClassCastException(activity.toString() + "must implement LoginFragmentListener"); Log.e( "接口实现异常" , activity.toString() + "未实现LoginFragmentListener接口!" ); } } // 监听登录验证结果的接口 public interface LoginFragmentListener { // 登录完毕 public void OnLoginComplete(String result); // 登录失败 public void OnLoginFailed(String result); // 退出成功 public void OnLoginOutFailed(String mSessionId); // 退出失败 public void OnLoginOutComplete(String result); } 二、重写finish退出最后一个fragment 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 /** * 重写finish,当fragment栈中只剩最后一个fragment时才finish */ @Override public void finish() { if (getSupportFragmentManager().getBackStackEntryCount() == 0 ) { super .finish(); } else { getSupportFragmentManager().popBackStack(); } } 本文转自 glblong 51CTO博客,原文链接:http://blog.51cto.com/glblong/1322346,如需转载请自行联系原作者

优秀的个人博客,低调大师

Android第四十二期 - 关于微信手势退出Activity的操作

微信现在支持手势退出当前Activity了,我也接到需求就写了,代码已经整理好,效果图如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 public GestureDetectorgestureDetector= new GestureDetector( new OnGestureListener(){ @Override public boolean onSingleTapUp(MotionEvente){ return false ; } @Override public void onShowPress(MotionEvente){ } @Override public boolean onScroll(MotionEvente1,MotionEvente2, float distanceX, float distanceY){ return false ; } @Override public void onLongPress(MotionEvente){ } @Override public boolean onFling(MotionEvente1,MotionEvente2, float velocityX, float velocityY){ MyLogUtil.v( "e1.getX()->" ,e1.getX()+ "" ); //控制只右滑 if (e2.getX()-e1.getX()> 0 &&(e1.getX()>= 0 &&e1.getX()<= 100 )){ if (Math.abs(e2.getX()-e1.getX())>Math.abs(e2 .getY()-e1.getY()) &&Math.abs(velocityX)> 1000 ){ overridePendingTransition(R.anim.open_next, R.anim.close_main); //finish(); onBackPressed(); } } return false ; } @Override public boolean onDown(MotionEvente){ return false ; } }); @Override public boolean dispatchTouchEvent(MotionEventev){ gestureDetector.onTouchEvent(ev); //scroll.onTouchEvent(ev); return super .dispatchTouchEvent(ev); } 本文转自 吴雨声 51CTO博客,原文链接:http://blog.51cto.com/liangxiao/1671773,如需转载请自行联系原作者

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

用户登录
用户注册