When running proguard to build my apk file, I get the following error:
Warning:Exception while processing task java.io.FileNotFoundException: C:\Users\Josh\Documents\AdscendUnityPlugin2.1.3\AdscendUnityPlugin2.1.3\HelloUnity\Export\HelloUnity\build\intermediates\proguard-rules\debug\aapt_rules.txt (The system cannot find the path specified)
My gradle file:
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.application'
repositories {
maven { url "https://bitbucket.org/adscend/androidsdk/raw/master/" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.adscendmedia.sdk:adscendmedia:2.1.26'
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
targetSdkVersion 25
}
lintOptions {
abortOnError false
}
buildTypes {
debug {
jniDebuggable true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
}
}
}
I couldn't seem to find the folder 'proguard-rules' either, what could be causing this error? Any ideas?
I am aware i'm running proguard on my debug build, i'm just trying to get it to work at this point.
Thank you
Enabling R8 in your project To enable R8, open build. gradle module app file and add this piece of code inside the buildTypes . The code inside the release{} block means that this will be applied to the release build version of your application. If you launch the app in the emulator, this code is not executed.
minifyEnabled true. // Enables resource shrinking, which is performed by the. // Android Gradle plugin. shrinkResources true. // Includes the default ProGuard rules files that are packaged with.
You can use the Android ProGuard tool to obfuscate, shrink, and optimize your code. Obfuscated code can be more difficult for other people to reverse engineer. ProGuard renames classes, fields, and methods with semantically obscure names and removes unused code.
In my case my custom proguard.pro is blank. Rebuild project works for me.
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