[Flutter] Android hat went wrong: A problem occurred evaluating project ':app'. > path may not be null or empty string. path='null'

Taehyun Nam·2021년 12월 2일
0
post-thumbnail

에러 메시지

What went wrong: A problem occurred evaluating project ':app'. > path may not be null or empty string. path='null'

원인

keystoreProperties를 못찾아서 발생한 문제
에러 내용을 조금 더 자세히보면 에러 line이 적혀 있는데, 해당 라인이 keystoreProperties였음.

key.properties 파일을 찾는데, 해당 파일이 없어서 발생한 문제

해결방안

1) 정석으로 해결하기

Github에 push 할때 key.properties가 빠져 있어서 발생한 문제.
해당 파일을 다른 개발자에게 받도록 하자!


2) 간단히 해결하기

개발 시 아래 내용을 주석 처리, 배포할때는 결국 key.properties가 필요함

/android/app/build.gradle

/*
    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.release
        }
       */

참고

https://github.com/transistorsoft/flutter_background_geolocation/issues/18#issuecomment-448714500

profile
Frontend Developer

0개의 댓글