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

run失败 #69

Closed
UTSOURCE opened this issue Sep 18, 2018 · 14 comments
Closed

run失败 #69

UTSOURCE opened this issue Sep 18, 2018 · 14 comments

Comments

@UTSOURCE
Copy link

image

@CarGuo
Copy link
Owner

CarGuo commented Sep 18, 2018

看起来是你本地的环境问题

@UTSOURCE
Copy link
Author

@CarGuo 我自己新建的可以正常运行,本地环境应该没有问题

@CarGuo
Copy link
Owner

CarGuo commented Sep 18, 2018

你看log,gradle下打印下就知道。

@UTSOURCE
Copy link
Author

我试试

@CarGuo
Copy link
Owner

CarGuo commented Sep 18, 2018

你看下图,项目的文件是这样的

5ba0a0d4e4b055bd5688207f

@UTSOURCE
Copy link
Author

@CarGuo
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

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 plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 27

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.shuyu.gsygithub.gsygithubappflutter"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 13
    versionName "1.1.3"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}


signingConfigs {
    debug {
        storeFile file("../gsygithubapp-debug.jks")
        storePassword "123456"
        keyAlias "debug"
        keyPassword "123456"
    }
    release {
        storeFile file("../gsygithubapp-debug.jks")
        storePassword "123456"
        keyAlias "debug"
        keyPassword "123456"
    }
}

buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        signingConfig signingConfigs.release
    }
}

}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
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'
}

@UTSOURCE
Copy link
Author

@CarGuo 我的不一样,我改下,在试试

@CarGuo
Copy link
Owner

CarGuo commented Sep 18, 2018

额···不是下载的这个项目么···

@UTSOURCE
Copy link
Author

是下载的这个项目,不知道怎么的不一样,奇怪了

@UTSOURCE
Copy link
Author

@CarGuo
image
这个情况怎么搞?

@UTSOURCE
Copy link
Author

fanqiang可以解决吗

@UTSOURCE
Copy link
Author

@CarGuo 新的错误
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Finished with error: FormatException: Bad UTF-8 encoding 0xc3 (at offset 152)
image

@CarGuo
Copy link
Owner

CarGuo commented Sep 18, 2018

重新运行就可以了

@UTSOURCE
Copy link
Author

@CarGuo ok了,谢谢!!!

@JevonShi JevonShi mentioned this issue Mar 10, 2020
@HaobinXu HaobinXu mentioned this issue Mar 20, 2020
@luan823230 luan823230 mentioned this issue Mar 24, 2020
@Andy957 Andy957 mentioned this issue Apr 16, 2020
@ngu2008 ngu2008 mentioned this issue Apr 17, 2020
@hzg1105 hzg1105 mentioned this issue May 3, 2020
@MrHGJ MrHGJ mentioned this issue May 19, 2020
@hzg1105 hzg1105 mentioned this issue Jun 14, 2020
@wangkr wangkr mentioned this issue Jul 4, 2020
@gss3000 gss3000 mentioned this issue Jul 8, 2020
@zaeMyn zaeMyn mentioned this issue Aug 5, 2020
This was referenced Jun 22, 2022
@HBLove HBLove mentioned this issue Nov 22, 2022
@jayVRIY jayVRIY mentioned this issue Dec 8, 2022
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

2 participants