2017-01-15 4 views
3

내가 안드로이드 스튜디오 2.2.3로 안드로이드 응용 프로그램을 만드는거야 허용되지 그리고 난이 오류 메시지가지고있어 이유를 이해할 수 없다 :분수 유형은

:

Error:(336, 49) Fraction types not allowed (at 'abc_dialog_fixed_height_major' with value '80%').

그것은 생성 된 파일의를

... 
<dimen name="abc_control_inset_material">4dp</dimen> 
<dimen name="abc_control_padding_material">4dp</dimen> 
<dimen name="abc_dialog_fixed_height_major">80%</dimen> 
<item name="abc_dialog_fixed_height_minor" type="dimen">100%</item> 
<dimen name="abc_dialog_fixed_width_major">320dp</dimen> 
... 

내 Gradle을 파일은 다음과 같습니다 :

이 라인

...\app\build\intermediates\res\merged\debug\values\values.xml

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 25 
buildToolsVersion "25.0.1" 
defaultConfig { 
    applicationId "com.oe_ba.hadis" 
    minSdkVersion 15 
    targetSdkVersion 25 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:25.1.0' 
compile 'com.google.code.gson:gson:2.7' 
compile 'com.android.support:recyclerview-v7:+' 
compile 'com.android.support:cardview-v7:+' 
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3' 
compile 'com.jakewharton.timber:timber:4.5.0' 
compile 'com.afollestad.material-dialogs:core:0.9.2.3' 
compile 'uk.co.chrisjenx:calligraphy:2.2.0' 
compile 'com.jenzz:materialpreference:1.3' 
compile 'com.malinskiy:superrecyclerview:1.1.4' 
testCompile 'junit:junit:4.12' 
} 

답변

1

퍼센트 값에는 항목 type="fraction"을 사용해야합니다. 자세한 내용은 here을 참조하십시오.

+0

하지만 그 파일에서 아무것도 변경할 수 없습니다. Android 자체에서 생성됩니다. 다시 만들려고 할 때마다 해당 파일의 변경 내용이 다시 설정되고 오류가 다시 발생합니다. –

+1

안드로이드 [merges] (https://developer.android.com/studio/write/add-resources.html#resource_merging) 다른 파일의 모든 값. '... \ app \ build \ intermediates \ res \ merged \ debug \ values ​​\ values.xml' 경로를보십시오. 생성 된 (병합 된) 파일입니다. 따라서 XML 파일에서 문제를 검색해야합니다. –