简体   繁体   中英

Error: ADB exited with exit code 1 Error launching application

  1. In pubspec.ymal I added english_words and the version to my dependencies list.
  2. While viewing the pubspec in Android Studio's editor view, I clicked Packages get which I believed pulled the package into my project.
  3. Then in main.dart I imported the package
  4. Lastly, I used the english_word to generate text.

Please help me review and see if there's something I didn't do right.

import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final wordPair = WordPair.random();
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Welcome to Flutter'),
        ),
        body: Center(
          child: Text(wordPair.asPascalCase),
        ),
      ),
    );
  }
}

在此处输入图像描述

Your app was correctly compiled/built but it could not be installed on your device. This can have multiple reasons, but as you could see in your terminal; the installation of the actual APK failed.

You should delete any other installations you have of your app, and you should change the ADB connection timeout:

Android error: Failed to install *.apk on device *: timeout

The problem of insufficient internal memory. After making the free space it successfully installed.

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