![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android异常
「已注销」
programming
展开
-
android网络访问异常java.lang.SecurityException: Permission denied (missing INTERNET permission?)
<uses-permission android:name="android.permission.INTERNET" />可能是由于需要访问网络,但是没有加入访问权限, 在AndroidManifest.xml中加入此网络访问权限就可以了原创 2016-07-01 17:33:10 · 3674 阅读 · 0 评论 -
EventBus 报“Subscriber class already registered to event class”错误
这句子的话意思也很容易理解,“接收者类已经被注册为事件类了”。之前我是这么写: 事件注册是写在onStart()里面的@Override protected void onStart() { super.onStart(); EventBus.getDefault().register(this); }来看一下Activity的生命周期:原创 2016-11-20 01:03:02 · 12109 阅读 · 4 评论 -
FragmentManager is already executing transactions
文章来处:解决 使用FragmentTabHost 和 viewpager时编译器报错 FragmentManager is already executing transactions这个报错说得也很明显,当前FragmentManager已经在执行了。 可能其他报错,可能是简单地说,只是重复执行而已,但是我的情况不一样 下面是我APP的情况 原因是第一次getFragmentManager转载 2016-12-11 22:00:41 · 10606 阅读 · 2 评论 -
ButterKnife 报Required view 'hello' with ID 2131427413 for field 'hello' was not found
Required view 'hello' with ID 2131427413 for field 'hello' was not found就是报上面这个奇怪的错,明明github上的提示添加什么包的,什么的都添加进去了然后我就看了其他什么的开源项目的什么的,然后就发现了一个不太一样的地方 buildscript { repositories { jcenter()原创 2016-10-08 18:52:29 · 4639 阅读 · 0 评论 -
android 报自定义的application无法强制转换成application问题细节解决
android.app.Application cannot be cast to com.tc.dragger2mystudyproject.APPApplication我在项目中定义了一个AppApplication继承自Application,在项目中的某一个地方通过getApplicationContext()强制转换成自定义的AppApplication,安正常逻辑AppApplicati原创 2016-10-08 15:48:12 · 2019 阅读 · 1 评论 -
ListView The content of the adapter has changed but ListView did not receive a notification.
10-10 04:25:59.813: E/AndroidRuntime(5300): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is原创 2016-10-10 16:58:30 · 717 阅读 · 0 评论 -
android导入外部数据库
public class DatabaseUtils { public static String data_path="" ; public File dataFile=null; public Context context; public static final String DB_NAME="english.db"; public Database原创 2016-09-10 13:53:48 · 412 阅读 · 0 评论 -
android xml布局文件中使用RelativeLayout,明明有这个id,却提示找不到---->解决办法
RelativeLayouterror: Error: No resource found that matches the given name (at ‘layout_above’ with value ‘@id/bottom_menu’).找不到id资源 因为程序由上到下执行的,XML的ID也是从上到下加载的,所以 先引用的必须使用“@+id”,系统会此变量,先申明在R文件中后面的原创 2016-07-01 18:14:09 · 1675 阅读 · 0 评论 -
android xml布局文件中使用RelativeLayout,明明有这个id,却提示找不到---->解决办法
RelativeLayouterror: Error: No resource found that matches the given name (at ‘layout_above’ with value ‘@id/bottom_menu’).找不到id资源 因为程序由上到下执行的,XML的ID也是从上到下加载的,所以 先引用的必须使用“@+id”,系统会此变量,先申明在R文件中后面的原创 2016-07-01 18:13:35 · 3401 阅读 · 0 评论 -
android recyclerView Binary XML file line #7: Error inflating class android.support.v7.widget.Recycl
Binary XML file line #7: Error inflating class android.support.v7.widget.RecyclerView原来在eclipse中使用RecyclerView只能导入API21.0.0中的包才可以使用。 解决办法:进入 sdk\extras\Android\m2repository\com\android\support\r原创 2016-07-01 18:04:42 · 574 阅读 · 0 评论 -
android java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout
java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout原创 2016-07-01 17:59:24 · 4135 阅读 · 0 评论 -
android ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hi
E/AndroidRuntime(1456): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 子线程不能更新UI子线程不直接更新UI,必须通知UI线程(主线程)去更新UI原创 2016-07-01 17:50:03 · 831 阅读 · 0 评论 -
android Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated wi
Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)没有数据(没有地址与主机结合) 还是网络权限的问题<uses-permission android:name="android.permission.INTERNET" />原创 2016-07-01 17:44:47 · 7740 阅读 · 1 评论 -
android The specified child already has a parent. You must call removeView() on the child's parent f
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.这种问题普遍出现在动态添加View时也就是非法状态异常,它说这个特定的child已经有一个parent了,你必须在这个parent中首先调用原创 2016-07-01 17:39:26 · 819 阅读 · 0 评论 -
android窗体溢出WindowManager$BadTokenException: Unable to add window -- token null is not for an applica
10-28 03:29:18.745: E/AndroidRuntime(1238): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application1、由于Activity结束之前没关闭窗体 2、dialog不能使用getApplicationCo原创 2016-07-01 17:35:19 · 481 阅读 · 0 评论 -
AndroidSchedulers.mainThread()无法切换到主线程,原来是细节问题啊
Observable.create(new Observable.OnSubscribe<Integer>() { @Override public void call(Subscriber<? super Integer> subscriber) { for (int i=0原创 2016-11-23 21:04:00 · 9270 阅读 · 2 评论