English 中文(简体)
无法操作比图样本代谢代文
原标题:Unable to run Bitmap sample code for Android
  • 时间:2012-04-19 09:47:33
  •  标签:
  • android

I am trying to run the sample from : http://developer.android.com/training/displaying-bitmaps/display-bitmap.html

然而,我遇到了许多错误,如:

1. 资源转移类型

BuildConfig cannot be resolved to a variable    ImageGridFragment.java  /ImageGridActivity/src/com/example/android/bitmapfun/ui line 124    Java Problem

1. 资源转移类型

SuppressLint cannot be resolved to a type   Utils.java  /ImageGridActivity/src/com/example/android/bitmapfun/util   line 99 Java Problem

我的谷歌是 的,但无法得到任何东西。 调整了 and建设目标,以4.0.3(15),但仍未确定。 谁成功地掌握了这一样本?

感谢。

最佳回答

Here is my solution: 1.Create a new class:

package com.example.android.bitmapfun;

public class BuildConfig {
public static final boolean DEBUG = true;
}

2. 对包含“支持”的内容进行补充:

//import android.annotation.SuppressLint;
//    @SuppressLint("NewApi")
问题回答

甲型开发器工具第17号给Eclipse带来一个特征:一门汽车是在建筑时间建造的,称为“建筑群”,其中包含一个固定的,供养者使用,以了解该建筑是否是建筑群或生产建筑。 这一特点似乎存在于Eclipse一体化支持中,因此在利用英特尔利J时,这一有用的特征是无法得到的。

在与R.java交织的基因组中,应当有建筑群。 java 如果你的方案得到成功编辑。

/** Automatically generated file. DO NOT MODIFY */
package com.example.android.bitmapfun;

public final class BuildConfig {
    public final static boolean DEBUG = true;
}

清除你的项目并试图再次启动。

它为我工作。

对我来说,这并非直接进口到ec。 就我而言,如果说有线错的话,那就对我课以罚款。 或许这不是一个正确的答案,但我们能够通过实施守则来看待应用功能,即这样。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签