Ad
ERROR: Could Not Get Unknown Property 'appcompat' For Project ':app' Of Type Org.gradle.api.Project
Error rising while Building Gradle of a code I found online.
implement "com.android.support:appcompat-v7:$project.appcompat"
implement "com.android.support:cardview-v7:$project.appcompat"
implement "com.android.support:recyclerview-v7:$project.appcompat"
implement "android.arch.lifecycle:runtime:$project.arch"
implement "android.arch.lifecycle:extensions:$project.arch"
implement "com.squareup.retrofit2:retrofit:$project.retrofit"
implement "com.squareup.retrofit2:converter-gson:$project.retrofit"
annotationProcessor "android.arch.lifecycle:compiler:$project.arch"
implement "com.android.support.constraint:constraint-layout:$project.constraintLayout"
implement "com.android.support:support-v4:$project.appcompat"
P.S. Problem is solves as i understood how to use a variable in gradle file
Ad
Answer
ERROR: Could not get unknown property 'appcompat' for project ':app' of type org.gradle.api.Project
It happens because you are trying to use a property $project.appcompat
not defined in your script.
Update your script with something like:
ext {
supportLibraryVersion = '28.0.0' //or your version
}
and then (pay attention, implementation
and not implement
)
dependencies {
// support libraries
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
//....
}
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad