English 中文(简体)
Problem in theFinding Resource file in Anders
原标题:Problem in Finding Resource File in Android

Hi i am using Google Maps in a code

This is the code written in the activity file


package com.hellomaps;

import android.app.Activity;
import android.os.Bundle;

import com.google.android.maps.MapActivity;

public class HelloGoogleMaps extends MapActivity{

    public void onCreate(Bundle savedInstanceState)
    {    
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        }

    @Override
    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }

MapView mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true);

}

如今,根据既定的字句,它并不回避“R”一词,因此不能在活动中使用地图,因为它并不回避这一观点。

我知道并roid。 R and com.google. 不应进口R。

i am stuck here .. kindly help..!!

预支

问题回答

当你汇编项目时,就会产生R文档。 因此,如果你只使用剪辑,就应当出现在你的项目里。

如果你从SVN或其他一些版本控制项目,你可能会在R档案中出现问题。 如果你这样做,就会在剪辑中产生新的和roid项目,然后复制/帕斯特的原始来源和资源,从检查项目到新项目,创造并建设。 希望这一帮助。





相关问题
Android floating view (over other views)

I ve been messing around with this for a few days now, hopefully someone here can lend me a hand. I have a simple two-column layout, the left side is a navigation bar with buttons, the right side is ...

How to layout text to flow around an image

Can you please tell me if there is a way to layout text around an image? Like this: ------ text text text | | text text text ----- text text text text text text text text text text text I ...

Android 2.1 bug: uses res/layout-v3 instead of res/layout

In addition to the general res/layout folder I have a res/layout-v3 folder for backward compatibility with Android 1.5, which has problems with some RelativeLayout layouts. It works perfectly with ...

ListView and LineraLayout under one ScrollBar

I want to create the following layout: Section 1 is a LinearLayout which contains an ImageView and a TextView Section 2 is a ListView with customized row layouts. I want to place both components ...

How do I remove lines between ListViews on Android?

I m using two ListViews like this: <ListView android:id="@+id/ListView" android:text="@string/Website" android:layout_height="30px" android:layout_width="150px" android:scrollbars="...

Android: LinearLayout addView Animation

I currently have a working Android program that programmatically adds views to a LinearLayout. I would like those views to be animated in and cannot find any good resources on figuring out how to do ...

How to specify id when uses include in layout xml file

In my layout xml file, I have included other layout xml file (each with a different android id). <include layout="@layout/view_contact_name" android:id="+id/test1"/> <include layout="@layout/...

热门标签