2016-04-04 22 views
0

データを入力したいが、私のコードでdrawableを使用していないときにこのエラーが見つかりました。そして、私は単純なEditTextを使ってデータを読むだけです。私はこのフォーラムで他の多くのソリューションを紹介しましたが、それは助けには役に立たないです。Logcat警告:Resources.getDrawable(int、Theme)またはContext.getDrawable(int)を使用することを検討してください。

Drawable android:drawable/text_cursor_material has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int). 
java.lang.RuntimeException 
    at android.content.res.Resources.getDrawable(Resources.java:740) 
    at android.support.v7.widget.TintResources.superGetDrawable(TintResources.java:48) 
    at android.support.v7.widget.AppCompatDrawableManager.onDrawableLoadedFromResources(AppCompatDrawableManager.java:374) 
    at android.support.v7.widget.TintResources.getDrawable(TintResources.java:44) 
    at android.widget.Editor$InsertionHandleView.getHotspotX(Editor.java:3772) 
    at android.widget.Editor$HandleView.updateDrawable(Editor.java:3399) 

編集(build.gradle)

apply plugin: 'com.android.application' 


android { 
compileSdkVersion 23 
buildToolsVersion "23.0.2" 


defaultConfig { 
    applicationId "com.example.user.myapp" 
    minSdkVersion 16 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
    // Enabling multidex support. 
    // multiDexEnabled true 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
wearApp project(':wear') 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.2.0' 
compile 'com.google.android.gms:play-services:8.4.0' 
compile 'com.android.support:design:23.2.0' 

compile files('libs/org.apache.http.legacy.jar') 

compile 'com.android.support:support-v4:23.2.0' 
} 
+0

ドロウアブルを設定する場所にコードを掲載します。 –

+0

あなたの 'build.gradle'を投稿してください –

答えて

0

は(推奨されません)このissue

  • 使用ContextCompat.getDrawable(Context, int)代わりにgetResources().getDrawable(int)をまとめます。

  • 使用0.8.5.7または利用可能な場合ではなく、0.8.5.6の材料-ダイアログ高いです。

関連する問題