No such property: compile for class: java.lang.String in android studio

Muhammad Junaid Khalid

My project was working fine till last month but now its not running, for some unknown reasons it gives a message No such property: compile for class: java.lang.String in app level build.gradle. My project remain untouched for a almost a month. Below is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.PSS.pssreminder"
        minSdkVersion 17
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:27.+'
    compile 'com.android.support:recyclerview-v7:27.+'
    compile 'com.getbase:floatingactionbutton:+'
    compile 'com.wdullaer:materialdatetimepicker:+'.
    compile 'com.bignerdranch.android:recyclerview-multiselect:+'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:+'

}

Can you please help me out to solve this issue.

Sneh Pandya

Replace all compile keywords with implementation. compile has been removed and replaced by implementation in gradle distributions. It should look like this:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.+'
    implementation 'com.android.support:recyclerview-v7:27.+'
    implementation 'com.getbase:floatingactionbutton:+'
    implementation 'com.wdullaer:materialdatetimepicker:+'.
    implementation 'com.bignerdranch.android:recyclerview-multiselect:+'
    implementation 'com.amulyakhare:com.amulyakhare.textdrawable:+'
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

No such property: split for class: java.lang.String

No such property: id for class: java.lang.String

compile error-Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbo in android studio

Android Studio-- conditionally compile a class in or not?

<p:selectManyMenu var> throws ELException: The class 'java.lang.String' does not have the property 'foo'

springSecurityService.getCurrentUser() returning error No such property: id for class: java.lang.String

elasticsearch mapping Expected map for property [fields] on field [name] but got a class java.lang.String

Android + Android Studio: cannot resolve method settext(java.lang.string)

Android Studio compile project with Java 8?

Android : how to compile java code to class

android studio 3.1 Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {

Android-Studio Could not find class causing java.lang.NoClassDefFoundError

java.lang.String class' value variable

Lifecycle of a Java class in android studio

Java activity class in android studio

org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'user'

android studio not starting java.lang.NoSuchMethodError

android studio java.lang.NoClassDefFoundError Gson

Android studio error : java.lang.NullPointerException

java.lang.NoClassDefFoundError Android Studio

java.lang.NoClassDefFoundError on android studio

Java.lang.UnsupportedOperationException Android Studio

How to call checkSelfPermission(android.content.Context,java.lang.String) from inner class

Unable to resolve java.lang.ClassNotFoundException: Didn't find class "com.example.android.camera2basic.AutoFitTextureView" in android studio?

Android studio showing decompiled class not java class

JsonMappingException Duplicate property ... for [simple type, class java.lang.Exception]

Android Studio Java String Compare

Android Studio "Invalid hash string" warning in Compile Sdk Version

java.lang.NumberFormatException: empty String in Android

TOP Ranking

HotTag

Archive