尽管尝试了其他各种方法,但现有警告中的3条似乎并没有消失。
Library class android.net.http.AndroidHttpClient implements program class org.apache.http.client.HttpClient
The method `void com.google.android.gms.iid.MessengerCompat.<init>(android.os.IBinder)` does not type check and will be assumed to be unreachable.
Library class android.net.http.AndroidHttpClient implements program class org.apache.http.client.HttpClient
以上3条警告是一致的。 我当前的proguard文件如下:
-dontwarn java.nio.file.Files
-dontwarn java.nio.file.Path
-dontwarn java.nio.file.OpenOption
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
-keep class javax.servlet.ServletContextListener
-dontwarn javax.servlet.ServletContextListener
-keep class com.google.firebase.** { *; }
-dontwarn com.google.firebase.**
-dontwarn org.apache.**
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
BUILd.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.tbg.www.thebutterflycorner"
minSdkVersion 21
targetSdkVersion 28
versionCode 14
versionName "14.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
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'
}
}
android {
useLibrary 'org.apache.http.legacy'
}
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-compat:28.0.0'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'com.google.firebase:firebase-firestore:21.1.0'
implementation 'com.karumi:dexter:4.2.0'
implementation 'com.google.firebase:firebase-auth:19.0.0'
implementation 'com.firebase:firebase-client-android:2.5.0'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'de.hdodenhof:circleimageview:3.0.1'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation files('libs/CircleImageView-master/gradle/wrapper/gradle-wrapper.jar')
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.github.msayan:tutorial-view:v1.0.10'
implementation 'com.google.api-client:google-api-client-android:1.30.4'
implementation 'com.google.api-client:google-api-client-gson:1.30.4'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.apache.httpcomponents:httpcore:4.4.12'
implementation 'org.apache.httpcomponents:httpmime:4.3.6'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
}
apply plugin: 'com.google.gms.google-services'
android manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tbg.www.thebutterflycorner">
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ResultActivity" />
<activity android:name=".SignInActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ContactActivity" />
<activity android:name=".CouponActivity" />
<activity android:name=".ShareActivity" />
<activity android:name=".MenuActivity" />
<activity android:name=".GameActivity" />
<activity android:name=".ButterfluyActivity" />
<activity android:name=".MainActivity" />
<activity android:name=".HelpActivity"></activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAWNDycLjhOoXec18EuN6rW7vkzqGpbpjQ" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
我不知道要为stackoverflow添加哪些其他详细信息以将其检测为有效问题, 所以这是一个字符串,您可以忽略#.gitignore