2017-07-18 4 views
1

私は初心者で、アンドロイドソース(Telegram App)をコンパイルしています。私の問題は、 minSdkVersionのものが含まれていて、私のアプリケーションをsdk 23.Androidのデフォルトmin sdkが動作しない

、それが動作しないと私はあるより低い23

マイbuild.gradleファイル上でそれを実行できない理由SDK分、私のデフォルトは14に設定されている、もちろん私は知りません。

apply plugin: 'com.android.application' 

repositories { 
    mavenCentral() 
    jcenter() 
} 

configurations { 
    compile.exclude module: 'support-v4' 
} 

dependencies { 
    compile 'com.google.android.gms:play-services-gcm:10.2.0' 
    compile 'com.google.android.gms:play-services-maps:10.2.0' 
    compile 'com.google.android.gms:play-services-vision:10.2.0' 
    compile 'com.android.support:support-core-ui:25.3.0' 
    compile 'com.android.support:support-compat:25.3.0' 
    compile 'com.android.support:support-core-utils:25.3.0' 
    compile 'com.android.support:support-v13:25.3.0' 
    compile 'com.android.support:palette-v7:25.3.0' 
    compile 'net.hockeyapp.android:HockeySDK:4.1.2' 
    compile 'com.googlecode.mp4parser:isoparser:1.0.6' 
    compile 'com.stripe:stripe-android:2.0.2' 
    compile 'com.android.support:support-v4:25.3.0' 
    compile 'com.android.support:recyclerview-v7:25.3.0' 
    compile 'com.android.support:design:25.3.0' 
    compile 'com.android.volley:volley:1.0.0' 



} 

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.2' 

    useLibrary 'org.apache.http.legacy' 
    defaultConfig.applicationId = "org.telegram.plusmess" 


    sourceSets.main.jniLibs.srcDirs = ['./jni/'] 

    externalNativeBuild { 
     ndkBuild { 
      path "jni/Android.mk" 
     } 
    } 

    dexOptions { 
     jumboMode = true 
     javaMaxHeapSize "4g" 

    } 

    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_7 
     targetCompatibility JavaVersion.VERSION_1_7 
    } 

    signingConfigs { 
//  debug { 
//   storeFile file("config/release.keystore") 
//   storePassword RELEASE_STORE_PASSWORD 
//   keyAlias RELEASE_KEY_ALIAS 
//   keyPassword RELEASE_KEY_PASSWORD 
//   v2SigningEnabled false 
//  } 
// 
//  release { 
//   storeFile file("config/release.keystore") 
//   storePassword RELEASE_STORE_PASSWORD 
//   keyAlias RELEASE_KEY_ALIAS 
//   keyPassword RELEASE_KEY_PASSWORD 
//   v2SigningEnabled false 
//  } 
    } 
    buildTypes { 
     debug { 
      debuggable true 
      jniDebuggable true 
      //signingConfig signingConfigs.debug 

     } 

     release { 
      debuggable false 
      jniDebuggable false 
//   signingConfig signingConfigs.release 
      minifyEnabled false 
      shrinkResources false 

      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 

     foss { 
      debuggable false 
      jniDebuggable false 

      //signingConfig signingConfigs.release 
     } 
    } 

    defaultConfig.versionCode = 957 

    sourceSets.debug { 
     manifest.srcFile 'config/debug/AndroidManifest.xml' 
    } 

    sourceSets.release { 
     manifest.srcFile 'config/release/AndroidManifest.xml' 
    } 

    sourceSets.foss { 
     manifest.srcFile 'config/foss/AndroidManifest.xml' 
    } 

    productFlavors { 
     x86 { 
      ndk { 
       abiFilter "x86" 
      } 
      versionCode = 2 
     } 
     armv7 { 
      ndk { 
       abiFilter "armeabi-v7a" 
      } 
      versionCode = 1 
     } 
     x86_SDK23 { 
      ndk { 
       abiFilter "x86" 
      } 
      sourceSets.debug { 
       manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' 
      } 
      sourceSets.release { 
       manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' 
      } 
      minSdkVersion 23 
      versionCode = 4 
     } 
     armv7_SDK23 { 
      ndk { 
       abiFilter "armeabi-v7a" 
      } 
      sourceSets.debug { 
       manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' 
      } 
      sourceSets.release { 
       manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' 
      } 
      minSdkVersion 23 
      versionCode = 3 
     } 
     fat { 
      sourceSets.debug { 
       manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' 
      } 
      sourceSets.release { 
       manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' 
      } 
      versionCode = 5 
     } 
    } 

    applicationVariants.all { variant -> 
     def abiVersion = variant.productFlavors.get(0).versionCode 
     variant.mergedFlavor.versionCode = defaultConfig.versionCode * 10 + abiVersion 
    } 

    defaultConfig { 
     minSdkVersion 14 
     targetSdkVersion 25 
     versionName "3.18.0" 
     multiDexEnabled true 

     externalNativeBuild { 
      ndkBuild { 
       arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-14" 
       abiFilters "armeabi-v7a", "x86" 
      } 
     } 
    } 
} 

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

T前もってハンクス。

+0

で発見あなたが構築しようとしたときに現れたのGradleエラーを提供してください可能性app –

+0

なぜあなたはそこに 'compile.exclude module: 'support-v4''を持っていますか?それを削除して問題を解決しようとしましたか? –

+0

@MohamedIbrahim可能なエラーはありません、私はちょうど23のSDKバージョンでそれを実行することはできません。 – allal

答えて

0

minSdkVersionが23を検索すると14

に変更しAndroidマニフェスト

を確認してください、私は

x86_SDK23 { 
      ndk { 
       abiFilter "x86" 
      } 
      sourceSets.debug { 
       manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' 
      } 
      sourceSets.release { 
       manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' 
      } 
      >>> [minSdkVersion 23] 
      versionCode = 4 
     } 
     armv7_SDK23 { 
      ndk { 
       abiFilter "armeabi-v7a" 
      } 
      sourceSets.debug { 
       manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' 
      } 
      sourceSets.release { 
       manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' 
      } 
      >>> [minSdkVersion 23] 
      versionCode = 3 
     } 
+0

それはうまく動かないだろう:私は前にそれをやったことがあるが、それは私にエラーを与えた。 – allal

+0

Androidマニフェストを確認してください – UmAnusorn

関連する問題