Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Résolu][Gradle] problème script build.gradle et flavor groups

Featured Replies

Posté(e)

Bonjour,

j'ai plusieurs applis qui utilisent le même squelette et donc logiquement regroupées dans un même projet gradle. Tout fonctionnait très bien jusqu'au passage à gradle 0.7. Depuis j'ai ce message d'erreur:

Gradle project refresh failed:
         Build script error, unsupported Gradle DSL method found: 'flavorGroup()'!
         Possible causes could be:  
         - you are using Gradle version where the method is absent 
         - you didn't apply Gradle plugin which provides the method
         - or there is a mistake in a build script

Impossible de compiler mes apps et impossible d'utiliser une version plus ancienne de gradle avec les derniers build tools Android :(

Je n'ai trouvé aucune information sur le net sur un retrait des flavourGroups et j'ai bien entendu essayé une install propre de toute ma toolchain.

Voici mon build.gradle (nettoyé):

 

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.8.+'
    }
}
apply plugin: 'android'


dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}


android {
    compileSdkVersion 19
    buildToolsVersion "19.0.1"


    defaultConfig {
        minSdkVersion 3
        targetSdkVersion 19
        versionCode 171
        versionName "2"
    }
    signingConfigs {
        release {
            storeFile file('...')
            storePassword "..."
            keyAlias "..."
            keyPassword "..."
        }
    }
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src/main/java']
            resources.srcDirs = ['src/main/java']
            aidl.srcDirs = ['src/main/java']
            renderscript.srcDirs = ['src/main/java']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
        instrumentTest.setRoot('tests')
    }
 
        flavorGroups "product", "abi"         productFlavors {             app1 {                 packageName = "com.domain.app1"                 flavorGroup "product"                 buildConfig "..."             }             app2 {                 packageName = "com.domain.app2"                 flavorGroup "product"                 buildConfig "..."             }             emu {                 flavorGroup "abi"                 buildConfig "public final static boolean IS_DEVICE = false;"             }             device {                 flavorGroup "abi"                 buildConfig "public final static boolean IS_DEVICE = true;"             }         }         buildTypes {             release {                 versionNameSuffix '.2.1'                 buildConfig "..."                 signingConfig signingConfigs.release             }             debug {                 versionNameSuffix '.2.1-DEBUG'                 buildConfig "..."             }             beta {                 versionNameSuffix '.2.1-BETA'                 buildConfig "..."                 signingConfig signingConfigs.release             }         } }

Voila, je suis preneur pour toute suggestion, piste, idée...

Modifié par Cyril Bosselut

Rejoignez la conversation

Vous pouvez poster maintenant et vous enregistrez plus tard. Si vous avez un compte, connectez-vous maintenant pour poster.

Invité
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Répondre à ce sujet…

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.