重复的zip条目[classes.jar:android/support/v4/app/INotificationSideChannel$Stub$Proxy.class]
通过react native 0.55.3为android项目工作,我在构建或制作发布项目后收到了复制类的消息: 警告:处理任务时出现异常java.io.IOException:无法写入[/home/hamed/src/DigitalPos/DigitalPos/android/app/build/intermediates/transforms/proguard/release/0.jar](无法读取[/root/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/aaf85f51113156ead949fc46be782001c/jars/classes.jar)(;;;;;;**.class)](重复的zip条目)[classes.jar:android/support/v4/app/INotificationSideChannel$Stub$Proxy.class])) 线程(任务限制器2):销毁 :app:TransformClasseSandreSourceWithProguardForRelease(线程[TaskWorker for':',5,main])已完成。耗时14.201秒 这是我的应用程序级构建。渐变(moduale:app)配置:重复的zip条目[classes.jar:android/support/v4/app/INotificationSideChannel$Stub$Proxy.class],android,react-native,duplicates,build.gradle,androidx,Android,React Native,Duplicates,Build.gradle,Androidx,通过react native 0.55.3为android项目工作,我在构建或制作发布项目后收到了复制类的消息: 警告:处理任务时出现异常java.io.IOException:无法写入[/home/hamed/src/DigitalPos/DigitalPos/android/app/build/intermediates/transforms/proguard/release/0.jar](无法读取[/root/.gradle/caches/transforms-1/files-1.1/co
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = true
android {
compileSdkVersion 28
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.digitalpos"
minSdkVersion 16
targetSdkVersion 27
versionCode 2
versionName "2.2.0.5"
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
vectorDrawables.useSupportLibrary = true
ndk {
abiFilters "armeabi-v7a", "x86"
}
multiDexEnabled true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
useProguard enableProguardInReleaseBuilds
zipAlignEnabled enableProguardInReleaseBuilds
debuggable false
shrinkResources enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
debug{
minifyEnabled enableProguardInReleaseBuilds
useProguard enableProguardInReleaseBuilds
zipAlignEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude("META-INF/*.kotlin_module")
exclude("META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version")
exclude("META-INF/proguard/coroutines.pro")
exclude ("META-INF/proguard/androidx-annotations.pro")
exclude 'META-INF/androidx.customview_customview.version'
exclude 'META-INF/androidx.legacy_legacy-support-core-ui.version'
exclude 'META-INF/androidx.drawerlayout_drawerlayout.version'
exclude 'META-INF/androidx.interpolator_interpolator.version'
exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
exclude 'META-INF/androidx.slidingpanelayout_slidingpanelayout.version'
exclude 'META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version'
exclude 'META-INF/androidx.print_print.version'
exclude 'META-INF/androidx.documentfile_documentfile.version'
exclude 'META-INF/androidx.*.version'
}
dexOptions {
javaMaxHeapSize "2g"
}
}
dependencies {
implementation 'com.scottyab:rootbeer-lib:0.0.7'
compile project(':react-native-file-viewer')
compile project(':react-native-html-to-pdf')
compile project(':react-native-fs')
compile project(':react-native-image-crop-picker')
compile project(':react-native-image-picker')
compile project(':react-native-wheel-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-uuid-generator')
compile project(':react-native-svg')
compile project(':react-native-smart-barcode')
compile project(':react-native-restart')
compile project(':react-native-linear-gradient')
compile project(':react-native-image-base64')
compile project(':react-native-i18n')
compile (project(':react-native-camera')) {
exclude group: "com.google.android.gms"
compile ('com.android.support:support-v4:26.1.0'){
force=true
}
compile 'com.android.support:exifinterface:27.1.1'
compile ('com.google.android.gms:play-services-vision:18.0.0') {
force = true
}
}
compile (project(':react-native-signature-capture')){
compile ('com.android.support:appcompat-v7:23.0.0'){
force = true
}
}
compile (project(':react-native-smart-barcode')){
compile ('com.android.support:appcompat-v7:23.4.0'){
force=true
}
}
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:0.55.3'
// From node_modules
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
preBuild.doFirst {
ant.replaceregexp(match:'androidx.core.content.', replace:'android.support.v4.content.',
flags:'g', byline:true) {
fileset(dir: '../../node_modules/react-native-file-
viewer/android/src/main/java/com/vinzscam/reactnativefileviewer', includes: '*.java')
}
}
// Top-level build file where you can add configuration options common to all sub-
projects/modules.
buildscript {
repositories {
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
google()
maven { url 'https://repo1.maven.org/maven2' }
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
// classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.1.3'
// classpath 'com.android.tools.build:gradle:3.5.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url 'https://repo1.maven.org/maven2' }
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
// jitpack repo is necessary to fetch ucrop dependency
}
configurations.all {
resolutionStrategy{
force 'com.android.support:support-v4:26.1.0'
force 'com.facebook.react:react-native:0.55.3'
force 'com.android.support:appcompat-v7:28.0.0'
// force 'com.android.support:appcompat-v7:23.0.0'
force 'com.android.support:support-annotations:26.1.0'
force 'com.squareup.okhttp3:okhttp:3.6.0'
force 'com.madgag.spongycastle:prov:1.54.0.0'
force 'com.madgag.spongycastle:core:1.54.0.0'
force 'com.google.zxing:core:3.2.1'
force 'com.google.android.gms:play-services-vision-common:18.0.0'
force 'com.android.support:exifinterface:26.1.0'
}
}
}
subprojects {
if (project.name.contains('react-native-vector-icons')
) {
buildscript {
repositories {
google()
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url "https://dl.bintray.com/android/android-tools/" }
maven { url 'https://repo1.maven.org/maven2' }
}
}
}else if (
project.name.contains('react-native-camera')
) {
buildscript {
repositories {
google()
maven { url "https://jitpack.io"
}
maven {
url 'https://maven.google.com'
}
maven { url 'https://repo1.maven.org/maven2' }
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}else {
buildscript {
repositories {
google()
maven { url "https://jitpack.io"
}
maven {
url 'https://maven.google.com'
}
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
ext {
compileSdkVersion = 26
targetSdkVersion = 26
minSdkVersion=16
buildToolsVersion = "26.0.2"
googlePlayServicesVersion = "12.0.1"
supportLibVersion = "26.1.0"
}
这是我的应用程序级构建。gradle(模块:我的项目名称)配置:
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = true
android {
compileSdkVersion 28
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.digitalpos"
minSdkVersion 16
targetSdkVersion 27
versionCode 2
versionName "2.2.0.5"
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
vectorDrawables.useSupportLibrary = true
ndk {
abiFilters "armeabi-v7a", "x86"
}
multiDexEnabled true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
useProguard enableProguardInReleaseBuilds
zipAlignEnabled enableProguardInReleaseBuilds
debuggable false
shrinkResources enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
debug{
minifyEnabled enableProguardInReleaseBuilds
useProguard enableProguardInReleaseBuilds
zipAlignEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude("META-INF/*.kotlin_module")
exclude("META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version")
exclude("META-INF/proguard/coroutines.pro")
exclude ("META-INF/proguard/androidx-annotations.pro")
exclude 'META-INF/androidx.customview_customview.version'
exclude 'META-INF/androidx.legacy_legacy-support-core-ui.version'
exclude 'META-INF/androidx.drawerlayout_drawerlayout.version'
exclude 'META-INF/androidx.interpolator_interpolator.version'
exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
exclude 'META-INF/androidx.slidingpanelayout_slidingpanelayout.version'
exclude 'META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version'
exclude 'META-INF/androidx.print_print.version'
exclude 'META-INF/androidx.documentfile_documentfile.version'
exclude 'META-INF/androidx.*.version'
}
dexOptions {
javaMaxHeapSize "2g"
}
}
dependencies {
implementation 'com.scottyab:rootbeer-lib:0.0.7'
compile project(':react-native-file-viewer')
compile project(':react-native-html-to-pdf')
compile project(':react-native-fs')
compile project(':react-native-image-crop-picker')
compile project(':react-native-image-picker')
compile project(':react-native-wheel-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-uuid-generator')
compile project(':react-native-svg')
compile project(':react-native-smart-barcode')
compile project(':react-native-restart')
compile project(':react-native-linear-gradient')
compile project(':react-native-image-base64')
compile project(':react-native-i18n')
compile (project(':react-native-camera')) {
exclude group: "com.google.android.gms"
compile ('com.android.support:support-v4:26.1.0'){
force=true
}
compile 'com.android.support:exifinterface:27.1.1'
compile ('com.google.android.gms:play-services-vision:18.0.0') {
force = true
}
}
compile (project(':react-native-signature-capture')){
compile ('com.android.support:appcompat-v7:23.0.0'){
force = true
}
}
compile (project(':react-native-smart-barcode')){
compile ('com.android.support:appcompat-v7:23.4.0'){
force=true
}
}
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:0.55.3'
// From node_modules
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
preBuild.doFirst {
ant.replaceregexp(match:'androidx.core.content.', replace:'android.support.v4.content.',
flags:'g', byline:true) {
fileset(dir: '../../node_modules/react-native-file-
viewer/android/src/main/java/com/vinzscam/reactnativefileviewer', includes: '*.java')
}
}
// Top-level build file where you can add configuration options common to all sub-
projects/modules.
buildscript {
repositories {
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
google()
maven { url 'https://repo1.maven.org/maven2' }
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
// classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.1.3'
// classpath 'com.android.tools.build:gradle:3.5.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url 'https://repo1.maven.org/maven2' }
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
// jitpack repo is necessary to fetch ucrop dependency
}
configurations.all {
resolutionStrategy{
force 'com.android.support:support-v4:26.1.0'
force 'com.facebook.react:react-native:0.55.3'
force 'com.android.support:appcompat-v7:28.0.0'
// force 'com.android.support:appcompat-v7:23.0.0'
force 'com.android.support:support-annotations:26.1.0'
force 'com.squareup.okhttp3:okhttp:3.6.0'
force 'com.madgag.spongycastle:prov:1.54.0.0'
force 'com.madgag.spongycastle:core:1.54.0.0'
force 'com.google.zxing:core:3.2.1'
force 'com.google.android.gms:play-services-vision-common:18.0.0'
force 'com.android.support:exifinterface:26.1.0'
}
}
}
subprojects {
if (project.name.contains('react-native-vector-icons')
) {
buildscript {
repositories {
google()
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url "https://dl.bintray.com/android/android-tools/" }
maven { url 'https://repo1.maven.org/maven2' }
}
}
}else if (
project.name.contains('react-native-camera')
) {
buildscript {
repositories {
google()
maven { url "https://jitpack.io"
}
maven {
url 'https://maven.google.com'
}
maven { url 'https://repo1.maven.org/maven2' }
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}else {
buildscript {
repositories {
google()
maven { url "https://jitpack.io"
}
maven {
url 'https://maven.google.com'
}
// jcenter()
jcenter {
url "https://jcenter.bintray.com/"
}
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
ext {
compileSdkVersion = 26
targetSdkVersion = 26
minSdkVersion=16
buildToolsVersion = "26.0.2"
googlePlayServicesVersion = "12.0.1"
supportLibVersion = "26.1.0"
}
在my gradle.properties集合中:
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=*
MYAPP_RELEASE_KEY_PASSWORD=*
android.enableAapt2=false
android.useAndroidX = true
android.enableJetifier = true
这是proguard-rules.pro:
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
public static *** i(...);
public static *** w(...);
public static *** e(...);
}
# React Native
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.proguard.annotations.DoNotStrip *;
@com.facebook.common.internal.DoNotStrip *;
}
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
void set*(***);
*** get*();
}
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
-dontwarn com.facebook.react.**
-keep,includedescriptorclasses class com.facebook.react.bridge.** { *; }
# hermes
-keep class com.facebook.jni.** { *; }
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
-dontwarn android.text.StaticLayout
# okhttp
-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
# okio
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
# minifyEnabled true
-ignorewarnings
# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
-renamesourcefileattribute SourceFile
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/,!class/merging/,!code/allocation/variable
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep class android.support.** { *; }
#React native
-keep class com.facebook.react.devsupport.** { *; }
-dontwarn com.facebook.react.devsupport.**
-dontwarn com.
#-keep class com.facebook.react.cxxbridge.ModuleRegistryHolder { *; }
#-keep class com.facebook.react.cxxbridge.CatalystInstanceImpl { *; }
#-keep class com.facebook.react.cxxbridge.JavaScriptExecutor { *; }
-keep class com.facebook.react.bridge.queue.NativeRunnable { *; }
-keep class com.facebook.react.bridge.ExecutorToken { *; }
-keep class com.facebook.react.bridge.ReadableType { *; }
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
-keep,allowobfuscation @interface com.facebook.jni.annotations.DoNotStrip
# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
-keep @com.facebook.jni.annotations.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.proguard.annotations.DoNotStrip *;
@com.facebook.common.internal.DoNotStrip *;
@com.facebook.jni.annotations.DoNotStrip *;
}
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
void set*(***);
*** get*();
}
-keep class * implements com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * implements com.facebook.react.bridge.NativeModule { *; }
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
##########################################################################
-dontwarn javax.annotation.**
-dontwarn android.app.**
-dontwarn android.support.**
-dontwarn android.view.**
-dontwarn android.widget.**
-dontwarn com.google.common.primitives.**
-dontwarn **CompatHoneycomb
-dontwarn **CompatHoneycombMR2
-dontwarn **CompatCreatorHoneycombMR2
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class *.R$ {
public static <fields>;
}
-keep public class net.sqlcipher.** {
*;
}
-keep public class net.sqlcipher.database.** {
*;
}
-assumenosideffects类android.util.Log{
公共静态***d(…);
公共静态***v(…);
公共静态***i(…);
公共静态***w(…);
公共静态***e(…);
}
#自然反应
-保留,allowbFusion@interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowFusion@interface com.facebook.proguard.annotations.KeepGetters和setters
-保留,allowbFusion@interface com.facebook.common.internal.DoNotStrip
#不要剥离任何用@DoNotStrip注释的方法/类
-保留@com.facebook.proguard.annotations.DoNotStrip类*
-保持@com.facebook.common.internal.DoNotStrip类*
-keepclassmembers类*{
@com.facebook.proguard.annotations.DoNotStrip*;
@com.facebook.common.internal.DoNotStrip*;
}
-keepclassmembers@com.facebook.proguard.annotations.KeepGettersAndSetters类*{
无效集*(***);
***得到*();
}
-keep class*扩展com.facebook.react.bridge.JavaScriptModule{*;}
-keep class*扩展com.facebook.react.bridge.NativeModule{*;}
-keepclassmembers,includedescriptorclasses类*{native;}
-keepclassmembers类*{@com.facebook.react.uimanager.UIProp;}
-keepclassmembers类*{@com.facebook.react.uimanager.annotations.ReactProp;}
-keepclassmembers类*{@com.facebook.react.uimanager.annotations.ReactPropGroup;}
-dontwarn com.facebook.react**
-keep,includedescriptorclasses类com.facebook.react.bridge.*{*;}
#爱马仕
-保持类com.facebook.jni.*{*;}
#TextLayoutBuilder在StaticLayout中使用非公共的Android构造函数。
#有关详细信息,请参见libs/proxy/src/main/java/com/facebook/fui/textlayoutbuilder/proxy。
-dontwarn android.text.StaticLayout
#okhttp
-保留署名
-keepattributes*注释*
-保持类okhttp3.*{*;}
-保持接口okhttp3.*{*;}
-dontwarn okhttp3**
#奥基奥
-保持类sun.misc.Unsafe{*;}
-dontwarn java.nio.file*
-dontwarn org.codehaus.mojo.animal_sniffer.ignorejrrequirement
-唐特沃恩·奥基奥**
#minifyEnabled true
-忽视警告
#取消对此的注释以保留行号信息
#调试堆栈跟踪。
-keepattributes源文件,LineNumberTable
#如果保留行号信息,请将其取消注释为
#隐藏原始源文件名。
-重命名SourceFileAttribute源文件
-优化过程5
-dontusemixedcaseclassnames
-DontskipnonPublicLibraryClass
-dontskipnonpubliclibraryclassmembers
-不要翻转
-冗长的
-优化!代码/简化/算术,!字段/,!类/合并/,!代码/分配/变量
-keep public class*扩展android.app.Activity
-keep public class*扩展android.app.Application
-保留类android.support.*{*;}
#自然反应
-保持类com.facebook.react.devsupport.*{*;}
-dontwarn com.facebook.react.devsupport**
-dontwarn公司。
#-保持类com.facebook.react.cxbridge.ModuleRegistryHolder{*;}
#-保持类com.facebook.react.cxbridge.CatalystInstanceImpl{*;}
#-保持类com.facebook.react.cxbridge.JavaScriptExecutor{*;}
-保持类com.facebook.react.bridge.queue.nativerunnamable{*;}
-保持类com.facebook.react.bridge.ExecutorToken{*;}
-保持类com.facebook.react.bridge.ReadableType{*;}
-保留,allowbFusion@interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowFusion@interface com.facebook.proguard.annotations.KeepGetters和setters
-保留,allowbFusion@interface com.facebook.common.internal.DoNotStrip
-保留,allowbFusion@interface com.facebook.jni.annotations.DoNotStrip
#不要剥离任何用@DoNotStrip注释的方法/类
-保留@com.facebook.proguard.annotations.DoNotStrip类*
-保持@com.facebook.common.internal.DoNotStrip类*
-keep@com.facebook.jni.annotations.DoNotStrip类*
-keepclassmembers类*{
@com.facebook.proguard.annotations.DoNotStrip*;
@com.facebook.common.internal.DoNotStrip*;
@com.facebook.jni.annotati