我正在尝试在我的应用程序中使用recommended location plugin但由于某种原因,应用程序只是在运行后强行关闭
flutter packages get
flutter run
我在Android上尝试这个,我没有iOS设备来测试这个问题
这是我运行flutter run -v
时退出后的输出:
[ +12 ms] Exit code 0 from: C:\Users\bramv\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt dump badging build\app\outputs\apk\app.apk
[ ] package: name='com.vanbilsen.bram.explr.explr' versionCode='1' versionName='1.0' platformBuildVersionName='7.1.1'
sdkVersion:'16'
targetSdkVersion:'25'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
uses-permission: name='com.vanbilsen.bram.explr.explr.permission.C2D_MESSAGE'
application-label:'explr'
application-label-af:'explr'
application-label-am:'explr'
application-label-ar:'explr'
application-label-az:'explr'
application-label-be:'explr'
application-label-bg:'explr'
application-label-bn:'explr'
application-label-bs:'explr'
application-label-ca:'explr'
application-label-cs:'explr'
application-label-da:'explr'
application-label-de:'explr'
application-label-el:'explr'
application-label-en-GB:'explr'
application-label-es:'explr'
application-label-es-US:'explr'
application-label-et:'explr'
application-label-eu:'explr'
application-label-fa:'explr'
application-label-fi:'explr'
application-label-fr:'explr'
application-label-fr-CA:'explr'
application-label-gl:'explr'
application-label-gu:'explr'
application-label-hi:'explr'
application-label-hr:'explr'
application-label-hu:'explr'
application-label-hy:'explr'
application-label-in:'explr'
application-label-is:'explr'
application-label-it:'explr'
application-label-iw:'explr'
application-label-ja:'explr'
application-label-ka:'explr'
application-label-kk:'explr'
application-label-km:'explr'
application-label-kn:'explr'
application-label-ko:'explr'
application-label-ky:'explr'
application-label-lo:'explr'
application-label-lt:'explr'
application-label-lv:'explr'
application-label-mk:'explr'
application-label-ml:'explr'
application-label-mn:'explr'
application-label-mr:'explr'
application-label-ms:'explr'
application-label-my:'explr'
application-label-nb:'explr'
application-label-ne:'explr'
application-label-nl:'explr'
application-label-pa:'explr'
application-label-pl:'explr'
application-label-pt-BR:'explr'
application-label-pt-PT:'explr'
application-label-ro:'explr'
application-label-ru:'explr'
application-label-si:'explr'
application-label-sk:'explr'
application-label-sl:'explr'
application-label-sq:'explr'
application-label-sr:'explr'
application-label-sr-Latn:'explr'
application-label-sv:'explr'
application-label-sw:'explr'
application-label-ta:'explr'
application-label-te:'explr'
application-label-th:'explr'
application-label-tl:'explr'
application-label-tr:'explr'
application-label-uk:'explr'
application-label-ur:'explr'
application-label-uz:'explr'
application-label-vi:'explr'
application-label-zh-CN:'explr'
application-label-zh-HK:'explr'
application-label-zh-TW:'explr'
application-label-zu:'explr'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='explr' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='com.vanbilsen.bram.explr.explr.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
main
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'af' 'am' 'ar' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-GB' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'pa' 'pl' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a' 'x86' 'x86_64'
[ +3 ms] Stopping app 'app.apk' on SM G955F.
[ +1 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb -s ce03171344a0ac420c shell am force-stop com.vanbilsen.bram.explr.explr
[+1820 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb -s ce03171344a0ac420c shell pm list packages com.vanbilsen.bram.explr.explr
[ +958 ms] package:com.vanbilsen.bram.explr.explr
[ +13 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb -s ce03171344a0ac420c shell cat /data/local/tmp/sky.com.vanbilsen.bram.explr.explr.sha1
[ +86 ms] c90a5f1e207ff12649437e079aec6e50c4557ab1
[ +4 ms] Installing APK.
[ +7 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb version
[ +44 ms] Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
Installed as C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb.EXE
[ +6 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb start-server
[ +52 ms] Installing build\app\outputs\apk\app.apk...
[ +3 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb -s ce03171344a0ac420c install -r build\app\outputs\apk\app.apk
[+6773 ms] Success
[ +9 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb -s ce03171344a0ac420c shell echo -n 7f3a0430df78ef8cb80a7864a72b7a73ed251cc2 > /data/local/tmp/sky.com.vanbilsen.bram.explr.explr.sha1
[ +105 ms] SM G955F startApp
[ +5 ms] C:\Users\bramv\AppData\Local\Android\Sdk\platform-tools\adb -s ce03171344a0ac420c shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true com.vanbilsen.bram.explr.explr/com.vanbilsen.bram.explr.explr.MainActivity
[+1088 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.vanbilsen.bram.explr.explr/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } (has extras) }
[ +4 ms] Waiting for observatory port to be available...
应用程序在没有插件的情况下运行完美
我正在使用的其他依赖项是firebase_database
,firebase_auth
,因此我认为它们不存在冲突。
任何经历过相同或有解决方案的人?
答案 0 :(得分:0)
我通过删除项目中的所有其他依赖项,运行flutter packages get
,运行应用程序解决了这个问题,之后,我又能够将原始依赖项添加到项目中。我认为这个问题与Flutter有关,而不是与位置插件本身有关。