2017-03-16 99 views
5

Android Studio 2.3生成已簽名Apk第二步簽名驗證v1(Jar簽名),v2(完整Apk簽名)如何啓用?Android Studio 2.3簽名步驟驗證v1(Jar簽名),v2(Full Apk簽名)已禁用

的gradle以下文件

簽名的.apk第二步截圖:

我的build.gradle文件是: -

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.2' 
    dataBinding { 
     enabled = true 
    } 
    defaultConfig { 
     applicationId 'com.revolution.it' 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     vectorDrawables.useSupportLibrary true 
     multiDexEnabled true 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
     debug { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    productFlavors { 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
     exclude group: 'com.android.support', module: 'support-v4' 
     exclude group: 'com.android.support', module: 'design' 
     exclude group: 'com.android.support', module: 'recyclerview-v7' 
    } 
    compile 'com.android.support:appcompat-v7:25.1.0' 
    compile 'com.android.support:design:25.1.0' 
    compile 'com.android.support:support-v4:25.1.0' 
    compile 'com.squareup.retrofit2:retrofit:2.1.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.1.0' 
    compile 'com.squareup.okhttp3:logging-interceptor:3.3.1' 
    compile 'uk.co.chrisjenx:calligraphy:2.2.0' 
    compile 'org.greenrobot:eventbus:3.0.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.google.firebase:firebase-messaging:10.0.1' 
    compile 'com.google.firebase:firebase-crash:10.0.1' 
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4' 

    // Image and file picker 
    compile 'com.droidninja:filepicker:1.0.8' 

    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.google.android.gms:play-services-location:10.0.1' 
    testCompile 'junit:junit:4.12' 
    debugCompile 'com.amitshekhar.android:debug-db:1.0.0' 

} 

apply plugin: 'com.google.gms.google-services' 

enter image description here

回答

7

終於讓我找到了問題的解決方案

v1或當我更新gradel版本沒有build.gradle(Proejct Level)
classpath 'com.android.tools.build:gradle:2.3.0'

我的舊的build.gradle(項目級別)

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.3' 
    } 
} 

allprojects { 
    ........ 
} 

task clean(type: Delete) { 
    ...... 
} 

更新的build.gradle(項目級別)

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.0' 
    } 
} 

allprojects { 
...... 
} 

task clean(type: Delete) { 
...... 
} 
+0

同時啓用,首先我必須啓用完整的APK簽名,但無法安裝在許多手機上,既解決了我的問題,我不知道它們之間有什麼區別,以及它爲什麼在某些手機上安裝。我曾嘗試全面卸載,但沒有奏效。順便說一句我正在使用簽名的apk – JSONParser