Every time I create a new Activity in AS 2.3 it messes up the build.gradle indentation that results in errors like this.
Error:Could not get unknown property 'compile' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I have to redo the indentations every time. Any idea how to fix this permanently?
For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
Some notable additions include a unified test execution between Android Studio and your continuous integration (CI) server ✅, convenient pairing flows to support ADB over Wi-Fi 📲, Improved Profiler tools to help you identify and analyze jank in your app 🕵️, and new ways to preview animations 🎥 and UI interactions ...
Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.
Don't use compile as a property and don't change the gradle structure.
compile 'com.android.support:appcompat-v7:22.2.1' compile
'com.parse:parse-android:1.11.0'
Sometimes Gradle build messes up the code like above, it still happens. Probably related to Java JDK updates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With