请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

下载仓库中的代码运行报错

Error: ADB exited with exit code 1
Performing Streamed Install

adb: failed to install /home/rd/Downloads/flutter_trip-master.tar/flutter_trip-master/flutter_trip/build/app/outputs/apk/app.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl310086333.tmp/base.apk (at Binary XML file line #28): Empty class name in package org.devio.fluttertrip]
Error launching application on Android SDK built for x86.

正在回答 回答被采纳积分+3

2回答

提问者 染指凉城丶 2019-09-03 08:40:26
AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.devio.fluttertrip">

    <!-- The INTERNET permission is required for development. Specifically,
         flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>

    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="Flutter之旅"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- This keeps the window background of the activity showing
                 until Flutter renders its first frame. It can be removed if
                 there is no splash screen (such as the default splash screen
                 defined in @style/LaunchTheme). -->
            <meta-data
                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
                android:value="true" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!--适配全面屏-->
        <meta-data
            android:name="android.max_aspect"
            android:value="2.3" />
    </application>
</manifest>


0 回复 有任何疑惑可以回复我~
CrazyCodeBoy 2019-09-02 21:59:40

亲是不是不经意间修改了AndroidManifest.xml了呢,将代码删除重新下载运行试一下

0 回复 有任何疑惑可以回复我~
  • 提问者 染指凉城丶 #1
    我下载了,什么都没改,安装依赖跑就报这错
    回复 有任何疑惑可以回复我~ 2019-09-03 08:40:08
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号