简体   繁体   English

Android Studio生成签名apk无法正常工作2

[英]Android Studio Generate Signed apk not working2

I used older android studio version to built my app and now I have the last version.When I want make signed apk I give errors because I want to use proguard and proguard-rules.pro is not exists.I built it manually in app folder but I still encountering errors.When I remove 'proguard-rules.pro' into build.gradle the problem is solving but I want to use proguard with rules because sum classes and sum files not working when minifyEnabled is true and 'proguard-rules.pro' is removed from this code proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' into build.gradle . 我使用较旧的android studio版本来构建我的应用程序,现在我使用的是最新版本。当我要生成签名的apk时,由于我要使用proguard和proguard-rules.pro不存在而出现错误,我在app文件夹中手动构建了它但是我仍然遇到错误。当我将'proguard-rules.pro'删除到build.gradle时 ,问题就解决了,但是我想将proguard与规则一起使用,因为当minifyEnabledtrue'proguard-rules.pro'时,求和类和求和文件不起作用'proguard-rules.pro'从此代码中删除proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'build.gradle中

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.FileNotFoundException: C:\Users\Hossein\Desktop\Root\app\proguard-rules.pro (The system cannot find the file specified)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

将名为proguard-rules.pro的文件添加到项目的Root\\app\\ ,然后再次对您的应用程序进行签名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM