작성
·
2.2K
1
코딩 내용에서는 빨간줄도 없이 모두 온전한 상태인데, 어플을 실행하면,
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
라는 메세지 이후에, 아래와 같이 되요!
코딩 외적인 문제인 것 같아 혼자 해결하기가 어렵네요.. 어떤게 문제인가요???!!!?
답변 13
3
제가 의심하고 있는 것은 androidX 관련 설정 때문이 아닐까 의심이 되는데요.
스샷을 보면 gradle 버전이 5.1.1 인듯합니다.
android/gradle/wrapper/gradle-wrapper.properties 에 버전을 4.10.2로 고쳐 보세요.
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Flutter에서는 최신 버전으로 하면 안 되고 가이드하는 버전으로 맞춰야 하는데 그 링크를 공유 드립니다.
참고 : https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
2
2
에뮬레이터와는 관계 없구요. 출시했을 때 영향도 없습니다.
pubspec.yaml 에 추가한 라이브러리들이 현재 androidX 기반으로 되어 있는데 이를 지원하려면 Flutter에서도 버전을 맞춰 줘야 합니다.
그 가이드가 위에 공유드린 링크입니다.
안드로이드 쪽이 격변하고 있는 와중에 Flutter도 거기에 대응하면서 벌어진 해프닝 정도로 생각하시면 됩니다.
1
1
1
오!!!!!!!!!!!!!!!!!!! 버전 정보를 적어주신대로 해보니깐 되네요!!! 정말 감사합니다 ㅜㅠㅜㅠㅜㅜㅜ 이 문제 해결한다고 몇 주를 발목잡혔네요ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ 정말 감사해요!!! 감사합니다!!
1
build.gradle 에서 보이는 에러는 android sdk 설정이 안 되어 있어서 그러는데 무시하셔도 되요.
android/build.gradle 에서
gradle 버전을 3.2.1 에서 3.3.0으로 변경 해 보시겠어요?
classpath 'com.android.tools.build:gradle:3.3.0'
1
1
0
0
app수준의 build.gradle에서
오류 2개와 경고 1나가 발견됐다고 합니다!
오류 2개는
def localProperties = new Properties() // cannot resolve symbol 'Properties' 라는 메세지가 보이고,
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.Properties file.") // cannot resolve symbol 'GradleException' 라는 메세지가 보입니다.
그리고
targetSdkVersion 28 에는 아래와 같은 메세지가 떠요!
그 외에는
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Add your own signing config for the release build.
이라는 주석이 달려있구요..
다른 파일에는 오류가 안보이는데 여기만 오류가 보이네요! 문제가 되는건가요??
0
0