实施为Android卫星菜单,XML文件美国无资源发现 [英] Implementing Satellite Menu for Android, XML File States No Resource Found

查看:184
本文介绍了实施为Android卫星菜单,XML文件美国无资源发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我尝试使用这个库,我试图让一个基础测试程序进行编译:的 https://github.com/siyamed/android-satellite-menu

First off, I'm attempting to use this library and I'm trying to get a base test program to compile: https://github.com/siyamed/android-satellite-menu

我保存的项目到我的硬盘驱动器,并将其导入到Eclipse中。我也确信它与Java 1.6的编译和设置为是图书馆。实际的磁带库设置在Eclipse中没有任何错误。

I've saved the project to my hard drive and imported it into Eclipse. I've also made sure it's compiling with Java 1.6 and is set to 'is library'. The actual library is set within Eclipse without any errors.

至于我的项目,我跟着GitHub上列出的说明,但我从我的XML文件中获取这些错误:

As for my project, I've followed the instructions listed on GitHub, but I'm getting these errors from my XML file:

Multiple annotations found at this line:
    - error: No resource identifier found for attribute 'satelliteDistance' in package 'android.view.ext'
    - error: No resource identifier found for attribute 'mainImage' in package 'android.view.ext'
    - error: No resource identifier found for attribute 'closeOnClick' in package 
     'android.view.ext'
    - error: No resource identifier found for attribute 'expandDuration' in package 
     'android.view.ext'
    - error: No resource identifier found for attribute 'totalSpacingDegree' in package 'android.view.ext'

下面是整个XML文件:

Here's the entire XML file:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sat="http://schemas.android.com/apk/res/android.view.ext"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<android.view.ext.SatelliteMenu
    android:id="@+id/menu"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|left" 
    android:layout_margin="8dp"
    sat:satelliteDistance="170dp"
    sat:mainImage="@drawable/ic_launcher"
    sat:totalSpacingDegree="90"
    sat:closeOnClick="true"
    sat:expandDuration="500"/>

</FrameLayout>

和我的Java源文件:

And my Java source file:

package com.example.test_satellite_menu;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.ext.SatelliteMenu;
import android.view.ext.SatelliteMenuItem;

public class MainActivity extends Activity {
SatelliteMenu menu = (SatelliteMenu) findViewById(R.id.menu);
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    List<SatelliteMenuItem> items = new ArrayList<SatelliteMenuItem>();
    items.add(new SatelliteMenuItem(4, R.drawable.ic_launcher));
    items.add(new SatelliteMenuItem(4, R.drawable.ic_launcher));
    items.add(new SatelliteMenuItem(4, R.drawable.ic_launcher));
    items.add(new SatelliteMenuItem(3, R.drawable.ic_launcher));
    items.add(new SatelliteMenuItem(2, R.drawable.ic_launcher));
    items.add(new SatelliteMenuItem(1, R.drawable.ic_launcher));
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}
}

我确信,我的测试项目包括了与它的卫星菜单库,和我用'修复项目属性以及清洁工程,所以现在我的想法:)任何在得到这个工作的反馈将是真棒。谢谢!

I've made sure that my test project has the satellite menu library included with it, and I've used 'fix project properties' as well as 'clean project', so now I'm out of ideas :) Any feedback on getting this to work would be awesome. Thanks!

找到我自己的答案通过StackOverflow的一些更多的阅读了。只好到android.view.awt包名称更改为我的当前项目的包名。

Found my own answer after some more reading through StackOverflow. Had to change the android.view.awt package name to the package name of my current project.

推荐答案

通过StackOverflow的一些阅读后发现我自己的答案。只好到android.view.awt包名称更改为我的当前项目的包名。

Found my own answer after some more reading through StackOverflow. Had to change the android.view.awt package name to the package name of my current project.

这篇关于实施为Android卫星菜单,XML文件美国无资源发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆