我正在尝试在我的Android项目中使用此cool library here。将库导入Android项目时出错
在GitHub的README它说:
使用方法:
导入 'SkyconsLibrary' 作为库到您的项目。
我这样做是通过点击文件/新建/导入模块而现在它在我的Android项目中。但是,试图利用图书馆在我的项目,当我得到这些下列错误:
使用:
<com.thbs.skycons.library.SunView
android:id="@+id/top_temp_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginTop="12dp"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="@+id/time_zone"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toRightOf="@+id/temp_view"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:isStatic = "true"
app:strokeColor = "#000000"
app:bgColor = "#ffffff"/>
错误:
Error: No resource identifier found for attribute 'isStatic' in package 'com.asus.MyApp'
什么我需要做的使用图书馆?我从来没有像这样导入一个库,通常我只是将路径添加到我的gradle文件中。
编辑:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute [email protected] value=(@mipmap/ic_launcher) from AndroidManifest.xml:12:9-43
is also present at [MyApp:SkyconsLibrary:unspecified] AndroidManifest.xml:13:9-29 value=(@null).
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:10:5-36:19 to override.
您是否已将'compile project(':SkyconsLibrary')'添加到您的应用的'build.gradle'文件中? (假设你的模块命名为SkyconsLibrary) – CommonsWare
@CommonsWare不,我没有,但我刚刚添加它,并且我得到了一个新的错误。我现在应该怎么做? – Carlton