• Android开发常见问题


    appcompat v7 问题

    SDK低于4.0,新建第一个Activity时会自动产生appcompat_v7

    http://jingyan.baidu.com/article/2d5afd69e846d285a2e28eff.html

    --------------------

    升级sdk 到5.0时,创建项目时会多创建一个库项目,叫appcompat_v7。
    创建完成后,这个项目可能会报错,诸如出现:No resource found that matches the given name 'android:Widget.Material.ActionButton'等错误。
    如果你不想创建appcompat_v7,你可以在创建项目时将minimum Required SDK设置为4.1以上,这时就不再生成
    appcompat_v7项目了,然后你再去清单文件中将minSdkVersion还原为8就行了.
     
    --------------------
    LogCat:
    --------------------------------------------------------------------------------------
    07-18 05:00:20.234: E/AndroidRuntime(1888): FATAL EXCEPTION: main
    07-18 05:00:20.234: E/AndroidRuntime(1888): Process: com.example.helloandroid, PID: 1888
    07-18 05:00:20.234: E/AndroidRuntime(1888): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.helloandroid/com.example.helloandroid.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
    更改 styles.xml 文件:
    <style name="AppTheme" parent="android:Theme.DeviceDefault">  
     
    --------------------
    eclipse创建android项目时,预览layout.xml文件时提示: This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in,导致无法正常预览布局文件。问题根源:SDK版本过高,ADT版本过低。解决方法如下。
    1. 找 到eclipse文件夹,打开eclipse软件,创建android应用项目,点击help选择install new software。In the Work with field,键入: https://dl-ssl.google.com/android/eclipse/,选择Developer Tools / Android Development Tools.点击next。开始安装。

    2. 若安装不成功,第二种解决方法。打开layout文件中的.xml文件,找到选择android版本按钮,改变android版本。

    3. 第三种解决方法是打开android项目中的project.properties,直接修改版本:target=android-18

    --------------------
    An error has occurred. See error log for more details.
    org.eclipse.swt.custom.StyledText.getScrollbarsMode()
     
    网上的解释是,MyEclipse 与ADT插件冲突。建议不要把adt放到dropin目录,还是通过在线安装的方式进行安装较妥。
    网上说的这种方式我没有尝试,因为实在不喜欢这种侵入式的插件安装方式。所以我最终的解决方式是换成低版本的ADT,更换成ADT-21.1.0版本后整个世界都变好了。
     
    --------------------
     
    --------------------
     
    --------------------
     
    --------------------
     
    --------------------
     
    --------------------
     
     
  • 相关阅读:
    单例模式
    Java多线程小例子(三个窗口卖火车票)
    HashMap和HashTable的区别
    javascript操作对象的方法
    javascript基本语法
    其他标签
    头标签
    label标签
    表单标签
    IO流-LineNumberReader
  • 原文地址:https://www.cnblogs.com/emanlee/p/5102207.html
Copyright © 2020-2023  润新知