安卓:导入项目/库? [英] Android: importing projects/libraries?

查看:190
本文介绍了安卓:导入项目/库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用code从我从GitHub下载了一个项目,但我一直收到错误信息。

有没有使用项目比将它导入到Eclipse中需要更多的步骤?

我目前只是复制和下载的项目矿山粘贴code。

尝试使用以下内容:

 < LinearLayout中的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    的xmlns:程序=htt​​p://schemas.android.com/apk/res/com.mikhaellopez.circularimageviewsample
    机器人:layout_width =FILL_PARENT
    机器人:layout_height =FILL_PARENT
    机器人:比重=中心
    机器人:方向=垂直>    < com.mikhaellopez.circularimageview.CircularImageView
        机器人:layout_width =250dp
        机器人:layout_height =250dp
        机器人:SRC =@绘制/图像
        应用:边界=真
        应用:border_color =@彩色/ GrayLight
        应用:BORDER_WIDTH =4DP
        应用:阴影=真/>< / LinearLayout中>

但得到的错误:

 在此行中发现多个注释:
     - 错误:未找到封装属性border_color'资源标识符
     com.mikhaellopez.circularimageviewsample
     - 错误:未找到封装属性影子资源标识符
     com.mikhaellopez.circularimageviewsample
     - 错误:未找到封装属性'边境'资源标识符
     com.mikhaellopez.circularimageviewsample
     - 错误:未找到封装属性BORDER_WIDTH'资源标识符
     com.mikhaellopez.circularimageviewsample


解决方案

  

有没有使用项目比将它导入到Eclipse中需要更多的步骤?


嗯,这要看情况。


  

我目前只是复制和下载的项目矿山粘贴code。


取决于该code是怎么写的,这可能无法正常工作。


  

但得到的错误:


修改

 的xmlns:程序=htt​​p://schemas.android.com/apk/res/com.mikhaellopez.circularimageviewsample

 的xmlns:程序=htt​​p://schemas.android.com/apk/res-auto

为您的应用程序不具有的包名 com.mikhaellopez.circularimageviewsample ,显然。

I am trying to use code from a project that I downloaded from Github, however I am consistently getting errors.

Is there more steps needed to use a project than importing it into eclipse?

I am currently just copying and pasting code from the downloaded project to mine.

Attempting to use the following:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res/com.mikhaellopez.circularimageviewsample"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center"
    android:orientation="vertical" >

    <com.mikhaellopez.circularimageview.CircularImageView
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:src="@drawable/image"
        app:border="true"
        app:border_color="@color/GrayLight"
        app:border_width="4dp"
        app:shadow="true" />

</LinearLayout>

But getting the error:

Multiple annotations found at this line:
    - error: No resource identifier found for attribute 'border_color' in package 
     'com.mikhaellopez.circularimageviewsample'
    - error: No resource identifier found for attribute 'shadow' in package 
     'com.mikhaellopez.circularimageviewsample'
    - error: No resource identifier found for attribute 'border' in package 
     'com.mikhaellopez.circularimageviewsample'
    - error: No resource identifier found for attribute 'border_width' in package 
     'com.mikhaellopez.circularimageviewsample'

解决方案

Is there more steps needed to use a project than importing it into eclipse?

Well, that depends.

I am currently just copying and pasting code from the downloaded project to mine.

Depending upon how that code is written, that may not work well.

But getting the error:

Change:

xmlns:app="http://schemas.android.com/apk/res/com.mikhaellopez.circularimageviewsample"

to:

xmlns:app="http://schemas.android.com/apk/res-auto"

as your app does not have the package name of com.mikhaellopez.circularimageviewsample, apparently.

这篇关于安卓:导入项目/库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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