2016-02-04 76 views
0

確定我知道這個問題已經回答了很多次,我見過很多崗位與所有種類的建議,但是不管我怎樣搭配的APK不會編譯解析Android SDK中proguard的編譯錯誤

這是我proguard-rules.pro文件

# Keep source file names, line numbers, and Parse class/method names for easier debugging 
-keepattributes SourceFile,LineNumberTable 
-keepnames class com.parse.** { *; } 
-keep class com.parse.** { *; } 

# Required for Parse 
-keepattributes *Annotation* 
-keepattributes Signature 
-dontwarn com.squareup.** 
-dontwarn okio.** 
-dontwarn com.parse.** 

和我gradle這個文件

apply plugin: 'com.android.application' 

android { 
    signingConfigs { 
     config { 
      keyAlias 'xxxxxx' 
      keyPassword 'xxxxxxx' 
      storeFile file('/xxx/xxx/xxx/xxx/xxx/xxx.jks') 
      storePassword 'xxxxxxx' 
     } 
    } 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 
    defaultConfig { 
     applicationId "xx.xxx.xxxx" 
     minSdkVersion 16 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0.0_beta1" 
     renderscriptTargetApi 20 
     renderscriptSupportModeEnabled true 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      signingConfig signingConfigs.config 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile project(':viewpagerindicator') 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.android.support:support-v4:23.1.1' 
    compile 'com.android.support:design:23.1.1' 
    compile 'com.google.android.gms:play-services-maps:8.4.0' 
    compile 'com.google.android.gms:play-services-location:8.4.0' 
    compile 'com.google.android.gms:play-services-analytics:8.4.0' 
    compile 'com.android.support:recyclerview-v7:23.1.1' 
    compile 'com.bignerdranch.android:recyclerview-multiselect:+' 
    debugCompile 'com.parse:parseinterceptors:0.0.1' 
    compile 'com.parse:parsefacebookutils-v4-android:[email protected]' 
    compile('com.facebook.android:facebook-android-sdk:4.8.0') { 
     exclude module: 'bolts-android' 
    } 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:palette-v7:23.1.1' 
    compile 'org.apmem.tools:layouts:[email protected]' 
    compile 'de.hdodenhof:circleimageview:2.0.0' 
    compile 'com.google.code.gson:gson:2.4' 
    compile 'jp.wasabeef:picasso-transformations:1.3.1' 
} 
每次我試圖改變發佈在Android Studio中的變體建立一個版本的apk

,它給我埃羅RS未fouding關於解析類的東西,像

Error:(4, 17) error: cannot find symbol class ParseClassName 
Error:(5, 17) error: cannot find symbol class ParseGeoPoint 

等 我不知道還有什麼嘗試,任何想法?感謝您的幫助

+0

哪裏是解析的主要依賴?即'com.parse:parse-android:1.10.3' –

+0

根據文檔,在這個類中沒有com.parse:parsefacebookutils-v4-android:[email protected]他們有解析SDK嵌入 – goseta

回答

0

所以我終於發現了問題,在此行

debugCompile 'com.parse:parseinterceptors:0.0.1' 

解析:parseinterceptors僅用於開發,但由於某種原因沒有I類不能解析類進口的,不知道爲什麼,當我包括解析:parseinterceptors其餘的課程都可用,這個答案我q問題,但如果有人知道原因,這可能會幫助我和未來的其他人