Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when flutter run -d #64

Open
carlosbdw opened this issue Mar 22, 2018 · 2 comments
Open

Error when flutter run -d #64

carlosbdw opened this issue Mar 22, 2018 · 2 comments

Comments

@carlosbdw
Copy link

Initializing gradle... 1.2s
Resolving dependencies...

  • Error running Gradle:
    Exit code 1 from: /Users/xxx/Documents/GitHub/droidkaigi2018-flutter/android/gradlew app:properties:
    Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
    java.lang.IllegalStateException: compileSdkVersion is not specified.

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/xxx/Documents/GitHub/droidkaigi2018-flutter/android/app/build.gradle' line: 19

  • What went wrong:
    A problem occurred evaluating project ':app'.

/Users/xxx/Documents/GitHub/droidkaigi2018-flutter/android/key.properties (No such file or directory)

@gen0083
Copy link

gen0083 commented Mar 23, 2018

I faced same error.
The causes that there is not committed key.properties file which using in generating release build apk.
comment out some lines in android/app/build.gradle like below then you can build project as debug mode.

android/app/build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withInputStream { stream ->
        localProperties.load(stream)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

//def keystorePropertiesFile = rootProject.file("key.properties")
//def keystoreProperties = new Properties()
//keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.droidkaigi2018"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 10000
        versionName "1.0.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    signingConfigs {
//        release {
//            keyAlias keystoreProperties['keyAlias']
//            keyPassword keystoreProperties['keyPassword']
//            storeFile file(keystoreProperties['storeFile'])
//            storePassword keystoreProperties['storePassword']
//        }
    }

    buildTypes {
        release {
            // Signing with the debug keys for now, so `flutter run --release` works.
//            signingConfig signingConfigs.release
        }

        profile {
            matchingFallbacks = ['debug', 'release']
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

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

@konifar
Copy link
Owner

konifar commented Mar 23, 2018

Sorry, I will check 👀

antygravity pushed a commit to antygravity/droidkaigi2018-flutter that referenced this issue Jul 10, 2018
antygravity pushed a commit to antygravity/droidkaigi2018-flutter that referenced this issue Jul 10, 2018
…arch-detail

[konifar#64] Shared element transition between speakers search and detail sc…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants