我正试图在我的安卓项目中使用这个这里的图书馆真酷。
在github自述中,它说:
如何使用: 将“SkyconsLibrary”作为库导入到您的项目中。
我点击了file/new/import模块,现在它在我的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 application@icon 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.
发布于 2016-12-26 17:00:40
当您将模块导入到项目中时,不会自动将其作为该项目中任何其他模块的依赖项添加。您仍然需要将compile
语句(如compile project(':SkyconsLibrary')
)添加到需要导入的库模块的模块中。
我又犯了个错误。我现在该怎么做?
错误消息告诉您要做什么:
建议:在AndroidManifest.xml:10:5-36:19的元素中添加‘tools:replace=:android:图标’以覆盖。
发布于 2016-12-26 17:06:41
可以使用以下步骤添加库:
就是这样。参考文献
https://stackoverflow.com/questions/41333945
复制相似问题