android-proguard

Library class (from Android sdk) depends on program class (again, Android sdk)

你说的曾经没有我的故事 提交于 2019-12-12 15:11:33
问题 We are migrating from Android Gradle plugin 2.3.3 to Gradle plugin 3.0.1. Our application consists of an Application module and a Library module. Several dependencies are transitive (connected using api keyword) but even making them non-transitive using implementation doesn't help. After changing all the compile -type dependencies to the new ones, debug build works well. However, release build with Proguard shows thousands of warnings (on 2.3.3 everything goes well) In particular, I don't get

Proguard causes Jackson error

走远了吗. 提交于 2019-12-12 14:07:33
问题 After enabling proguard rules I faced with the following So error come before sending anything to network. java.lang.RuntimeException: Unable to convert FormDocTankPermission to RequestBody caused by com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class FormDocTankPermission and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) My class that I send as @Retrofit.Body look like

Cannot find a version of 'com.android.support:support-annotations' that satisfies the version constraints

徘徊边缘 提交于 2019-12-12 07:25:04
问题 When i want to generate a signed APK (release) using Proguard rules i got this error message : Cannot find a version of 'com.android.support:support-annotations' that satisfies the version constraints: Dependency path 'Transition:library:unspecified' --> 'com.android.support.test:runner:1.0.2' --> 'com.android.support:support-annotations:27.1.1' Constraint path 'Transition:library:unspecified' --> 'com.android.support:support-annotations' strictly '26.1.0' because of the following reason:

ProGuard to keep class members with “unused” annotation

时光毁灭记忆、已成空白 提交于 2019-12-12 04:33:26
问题 The app has dependency on library, which has class members with @SuppressWarnings("unused") annotation. When I made use of proguard-rules.pro by, minifyEnabled true in gradle file, the members with above annotations are not found at runtime, with NoSuchFieldError error. How to keep those members from that library package, with annotation @SuppressWarnings("unused") , through "proguard-rules.pro" 回答1: The @SuppressWarnings annotation has source-level retention, thus it is not present in the

org.apache.http.legacy.jar Proguard error

六月ゝ 毕业季﹏ 提交于 2019-12-12 03:50:07
问题 When I use httpclient-4.5.2.jar + httpcore-4.4.4.jar , Proguard works fine. But when I replace the above to packages by org.apache.http.legacy.jar , following Proguard error is reported: Proguard returned with error code 1. See console Note: there were 273 duplicate class definitions. Warning: library class android.webkit.WebView depends on program class android.net.http.SslCertificate Warning: library class android.webkit.WebView depends on program class android.net.http.SslCertificate

Android: Proguard error in eclipse

冷暖自知 提交于 2019-12-11 23:22:11
问题 I am trying to built the signed apk of my app. But i am getting the error pop up as Proguard returned with error code 1. See console And error log in console as : [2016-04-15 11:36:44 - MyApp] Proguard returned with error code 1. See console [2016-04-15 11:36:44 - MyApp] Note: there were 85 duplicate class definitions. [2016-04-15 11:36:44 - MyApp] Warning: org.acra.ErrorReporter: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang

How to use proguard.config setting in project.properties file?

空扰寡人 提交于 2019-12-11 20:12:20
问题 I use eclipse and I guess ant building system. In my project root i have a project.properties file which contains proguard.config setting. This setting is said in sdk examples to either proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt or proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt I have found somewhere that you can state multiple files delimited by colon ":". But nowhere it is explained in depth which of

Proguard 6.0.3 fails with java.lang.ArrayIndexOutOfBoundsException: -1

白昼怎懂夜的黑 提交于 2019-12-11 17:05:15
问题 After updating to Android Studio 3.2 I can't generate signed APK unless I enforce usage of Proguard 5.3.2 in gradle with: configurations.all { resolutionStrategy { force 'net.sf.proguard:proguard-gradle:5.3.2' } } With the new Proguard 6.0.3 the build fails with following error: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':transformClassesAndResourcesWithProguardForRelease_beta'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions

Building an apk file

眉间皱痕 提交于 2019-12-11 15:43:02
问题 I just done with coding in my application , it runs ok without any problem but I stuck in building the apk I want to make my apk file , gradle make some errors and I don't know how can I fix this this is the error: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103) at org.gradle.api.internal

FirebasePerformance SDK external library issue in proguard

試著忘記壹切 提交于 2019-12-11 14:08:08
问题 I have implemented FirebasePerformance SDK to measure app performance. It is working fine in debug mode without proguard but giving issue of an external library used in my application when trying to generate a signed build using proguard . Getting following issue: java.io.IOException: Can't read [F:\MyApp\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\folders\1\2\7776c3fca671135b87737cd2d8b26538-sessionkeygenerator(;;;;;;**.class)] (F:\MyApp\app\build\intermediates