我正在嘗試在我的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