XML图像croper theartofdev库中的错误



我在我的 xml文件中有一个错误,我不明白它是在图像croper croper theartofdev库的裁切图像活动的xml文件中。

错误是在<com.theartofdev.edmodo.cropper.CropImageView行,错误显示找不到元素的声明'com.theartofdev.edmodo.cropper.cropimageview'

<?xml version="1.0" encoding="utf-8"?>
<com.theartofdev.edmodo.cropper.CropImageView
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   android:id="@+id/cropImageView"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   app:cropScaleType="center"/>

gradle文件

apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.smartloan.smtrick.smart_loan_admin"
    minSdkVersion 21
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
dataBinding
        {
            enabled = true
        }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.ramotion.foldingcell:folding-cell:1.2.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.firebaseui:firebase-ui-database:0.4.0'
implementation 'com.firebaseui:firebase-ui-storage:1.1.1'
implementation 'com.firebase:firebase-client-android:2.5.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:1.2.1'
androidTestImplementation 'com.android.support.test.espresso:espresso- 
core:3.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'commons-io:commons-io:+'
implementation project(':cropper')
}
apply plugin: 'com.google.gms.google-services'

我可以查看您的androidManifest.xml文件吗?如果您没有在应用程序标签中添加以下行,则它将不起作用。

<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
            android:theme="@style/Base.Theme.AppCompat" />

最新更新