zoukankan      html  css  js  c++  java
  • Android Bug 记录

     1、Unable to resolve target 'android-5'  无法解析目标 ' 安卓系统-5'

         Unable to resolve target 'Google Inc.:Google APIs:7'

      1>.工程有一个Android Manifest文件,双击进入
    2>.切换到代码区,在<manifest--->下加入这句话<uses-sdk android:minSdkVersion="8" />

    3>.直接进入manifest区,点击user sdk 修改成你模拟器对应的版本:8或者10

      2、no launcher activity found  无法解析目标 ' 安卓系统-5'

           he launch will only sync the application package on the device!

       原因是: 在 AndroidManifest.xml没有加:

     3.Syntax error on tokens, delete these tokens

         我今天就遇到了一回,这个错误一般是弄错了引号括号之类造成的,但是今天我发现,如果在代码前过多空格,也是会有这个错误的,特别是对于那些黏贴来的代码,很容易出现这个问题,和大家分享下

           

    1              <intent-filter>
    2                 <category android:name="android.intent.category.LAUNCHER" />
    3                 <action android:name="android.intent.action.MAIN" />
    4             </intent-filter>
    View Code

           所以启动器找不到要启动的Activity。

           修改前的 AndroidManifest.xml:

       

     1 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     2     package="com.test.test"
     3     android:versionCode="1"
     4     android:versionName="1.0" >
     5     <uses-sdk
     6         android:minSdkVersion="11"
     7         android:targetSdkVersion="17" />
     8     <application
     9         android:allowBackup="true"
    10         android:icon="@drawable/ic_launcher"
    11         android:label="@string/app_name"
    12         android:theme="@style/AppTheme" >
    13         <activity android:name="com.test.sudoku.Sudoku" >           
    14         </activity>
    15     </application>
    16 </manifest>
    View Code

           修改后:

            

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.test.test"
        android:versionCode="1"
        android:versionName="1.0" >
        <uses-sdk
            android:minSdkVersion="11"
            android:targetSdkVersion="17" />
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity android:name="com.test.sudoku.Sudoku" >
                <strong><intent-filter>
                    <category android:name="android.intent.category.LAUNCHER" />
                    <action android:name="android.intent.action.MAIN" />
                </intent-filter></strong>
            </activity>
        </application>
    </manifest>
    View Code
  • 相关阅读:
    hdu 2485 Destroying the bus stations 迭代加深搜索
    hdu 2487 Ugly Windows 模拟
    hdu 2492 Ping pong 线段树
    hdu 1059 Dividing 多重背包
    hdu 3315 My Brute 费用流,费用最小且代价最小
    第四天 下载网络图片显示
    第三天 单元测试和数据库操作
    第二天 布局文件
    第一天 安卓简介
    Android 获取存储空间
  • 原文地址:https://www.cnblogs.com/Dylanblogs/p/4175398.html
Copyright © 2011-2022 走看看