IDE: Android Studio 1.1.0
Subject: ProGuard
Problem: ProGuard files or tools not recognized by Android Studio, getDefaultProguardFile
can not be resolved and there's no proguard-android.txt
and proguard-rules.txt
files in the app, see the image below: (from build.gradle)
How to fix this and achieve ProGuard protection to my App ?
Android Studio provides a unified environment where you can build apps for Android phones, tablets, Android Wear, Android TV, and Android Auto. Structured code modules allow you to divide your project into units of functionality that you can independently build, test, and debug.
The Android Studio IDE is free to download and use. It has a rich UI development environment with templates to give new developers a launching pad into Android development.
Android Studio supports all the same programming languages of IntelliJ (and CLion) e.g. Java, C++, and more with extensions, such as Go; and Android Studio 3.0 or later supports Kotlin and "all Java 7 language features and a subset of Java 8 language features that vary by platform version."
The official language for Android development is Java. Large parts of Android are written in Java and its APIs are designed to be called primarily from Java.
I had the same trouble as shown here:
The error message makes it seem as if the file is not being found, and therefore not read. However, I went to into sdk/tools/proguard folder to find the file, and at the top added a statement to test if the file was actually being read. I put at the top "Will this crash it?"
As you can see from the error, the file was indeed found during the build process and the statement I added crashed it. Thus, it appears the "can't resolve symbol" error is giving a false positive.
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