• android 错误收集


    2. is not translated in 

    Eclipse > Preference > Android > Lint Error Checking的Correctness: Messages > MissingTranslate
    将 Severity 从 Fetal 改为 Warming

    1.cannot be resolved or is not a field

    R.layout.main总是在layout提示错误。clean一下工程或者fix project properties 还是解决不了

    原因可能是添加文件,比如xml文件或者资源文件时,系统自动添加了import android.R;

    android.R是系统提供的资源,R是应用程序的资源。这时候只要删除 import android.R;这条语句就可以了。

    2. 关联library     

         选中项目右键--->properties--->android--->修改library指引

    3.库的引用 project.properties

    android.library.reference.1=../library

    4.下载SDK时,Read timed out Done. Nothing was installed.

    Start the SDK manager as Administrator 或设置Tools--->options

    .

         

    5. Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.     

    6.Don't dump hprof file because it is not in monkey test

    7.java.lang.IllegalMonitorStateException: object not locked by thread before wait()

    二。

    1.unbound prefix

    明明是从网上down来的代码,copy上去了却报错,而且提示unbound prefix。

    解决:删除重新写。自己也不知道哪儿出了错。

    2.No resource identifier found for attribute 'source' in package 'android'

    android:resource 写成了android:source

    3.Attribute is missing the Android namespace prefix

    前面少写了双引号,后面报错

    4.Class requires API level 3 (current min is 1)

    Right click on the project folder > Android tools > Clear Link Markers

     5.IntentService测试 出错 newInstance failed: no <init>()

    public class MyIntentService extends IntentService {
    
        private static final String TAG_STRING = "MyIntentService";
        public MyIntentService(String name) {
            //其实IntentService的name参数用于: Used to name the worker thread, important only for debugging.
            super(name);
        }
    
        @Override
        protected void onHandleIntent(Intent intent) {
            Log.v(TAG_STRING,"onHandleIntent sleep for 20 seconds");
            Log.v(TAG_STRING, "onHandleIntent--Thread id :  "+Thread.currentThread().getId());
            try {
                Thread.sleep(20000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    
    }

    修改为:

     public MyIntentService() {
             super(TAG_STRING);
     }

     

      

  • 相关阅读:
    数据挖掘读书笔记-数据库系统技术
    数据挖掘读书笔记-典型的数据挖掘系统
    数据挖掘读书笔记-数据挖掘的概念
    数据产品经理做什么?
    从浏览器渲染的角度谈谈html标签的语义化
    Mozilla推动互联网成为游戏发展的强有力平台
    css知识点
    css变形 transform
    跟css背景有关的属性
    css颜色表示的方式
  • 原文地址:https://www.cnblogs.com/yuyutianxia/p/3489773.html
Copyright © 2020-2023  润新知