eclipse - error: strings in switch are not supported in -source 1.6 (use -source 7 or higher to enable strings in switch) in Android Studio -


i have created 1 project in eclipse ,but converting project android studio project. when trying run converted project, getting "error: strings in switch not supported in -source 1.6 (use -source 7 or higher enable strings in switch)" in messeges tab of android studio

my build.gradle file

apply plugin: 'com.android.application'  android { compilesdkversion 19 buildtoolsversion "23.0.0"  defaultconfig {     applicationid "com.pcs.sliderringtineproj"     minsdkversion 10     targetsdkversion 19  }  buildtypes {     release {         minifyenabled false         proguardfiles getdefaultproguardfile('proguard-android.txt'),     'proguard-rules.txt'     }  } } compileoptions { sourcecompatibility javaversion.version_1_7 targetcompatibility javaversion.version_1_7 } dependencies { compile project(':facebooksdk') compile 'com.android.support:support-v4:19.1.0' compile 'com.android.support:appcompat-v7:20.+' compile files('libs/acra-4.5.0.jar') compile files('libs/aspectjrt-1.7.3.jar') compile files('libs/commons-io-2.4.jar') compile files('libs/fmmr.jar') compile files('libs/isoparser-1.0.1.jar') compile files('libs/libgoogleanalytics.jar') compile files('libs/log4j-1.2.15.jar') compile files('libs/picasso-2.4.0.jar') compile files('libs/universal-image-loader-1.9.0.jar') } 

open build.gradle file of application module , add following section called android:

compileoptions {     sourcecompatibility javaversion.version_1_7     targetcompatibility javaversion.version_1_7 } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -