我在依赖项中的Android Studio中实现了库:
dependencies {
compile 'com.rockerhieu.emojicon:library:1.0'
}
我还在Android Manifest.xml文件中添加了xmlns:tools="http://schemas.android.com/tools"
,并在Android_Manifest.xml文件中的标记中添加了tools:replace="android:icon"
。
当我构建项目时,出现了这个错误:
错误:(8)找不到属性的资源标识符 ' emojiconAlignment'在包' com.example.projectemojitest'
这里是xml:
package="com.emojitest"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
xmlns:app="http://schemas.android.com/apk/res-auto"
android:name=".ChatApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
tools:replace="android:icon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".CreateAccount"
android:label="@string/title_activity_create_account" >
</activity>
<activity
android:name=".ChatActivity"
android:label="@string/title_activity_chat" >
</activity>
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_login" >
</activity>
<!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
答案 0 :(得分:-1)
emojiconAlignment
确保您的应用程序中确实存在这种情况,如果存在,则应使用
xmlns:app="http://schemas.android.com/apk/res-auto"
调用库的属性。