简体   繁体   中英

Running flutter app on physical android error

I try to run the app onto my physical android phone, and i get this error

Error: ADB exited with exit code 1
adb: failed to install /Users/User/AndroidStudioProjects/appname/build/app/outputs/apk/app.apk: Failure [INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME: Invalid manifest package: must have at least one '.' separator]
Error launching application on Pixel XL.

I had just updated my flutter from v.0.3.1 to v.0.7.3 and also prepped it for deployment and now im getting this error

i have no idea how to go about fixing this, does anyone have any suggestions?

This error is because you have capital letters in your package name like this.

Com.example.anubhav;

You need to change it to small letters:

com.example.anubhav;

You can refer to this SO post which tells you how to change package name in flutter.

It's a error to install your app at your mobile emulator, you have to clean it:

  1. Open AVD Manager
  2. Wipe Data (delete datas from emulator)
  3. Open emulator
  4. Try to run app

In this case it's give you alert in your physical device for installation of App. please allow to install option.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM