dart 扑动应用程序未在物理器械上运行

bbuxkriu  于 2023-02-01  发布在  其他
关注(0)|答案(1)|浏览(128)

如果我尝试在我的物理设备上运行我的应用程序,这是一个华为Mate 20建兴它只是不工作。我有最新的SDK。我升级了所有使用***flutter升级-力***工作正常。Flutter医生说没有发现任何问题。我已经使用***flutter运行-v***在终端和以下是输出:

E: activity (line=21)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.big_randomizer.MainActivity" (Raw: "com.example.big_randomizer.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=35)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.a
ndroid.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.em
bedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=49)
                     E: action (line=50)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=52)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUN
CHER")
                 E: meta-data (line=59)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[  +14 ms] Stopping app 'app.apk' on SNE LX1.
[+749666 ms] executing: C:\Users\Public\AppData\platform-tools\adb.exe -s HYF0218821022991 shell am force-stop
com.example.big_randomizer
[ +445 ms] executing: C:\Users\Public\AppData\platform-tools\adb.exe -s HYF0218821022991 shell pm list packages
com.example.big_randomizer
[ +227 ms] Installing APK.
[  +19 ms] Installing build\app\outputs\flutter-apk\app.apk...
[   +3 ms] executing: C:\Users\Public\AppData\platform-tools\adb.exe -s HYF0218821022991 install -t -r
C:\Flutter\Projekte\big_randomizer\build\app\outputs\flutter-apk\app.apk
[+4339 ms] Performing Streamed Install
                    Success
[   +6 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 4,3s)
[  +32 ms] executing: C:\Users\Public\AppData\platform-tools\adb.exe -s HYF0218821022991 shell echo -n
6e220f6fa0e648db5c3caadcc686e97764a53fb9 > /data/local/tmp/sky.com.example.big_randomizer.sha1
[ +197 ms] executing: C:\Users\Public\AppData\platform-tools\adb.exe -s HYF0218821022991 shell -x logcat -v time -t 1
[ +254 ms] --------- beginning of main
                    08-27 15:49:11.640 I/PreDnsController(  605): canPreDnsQuery,persist.sys.predns is false!
[  +76 ms] executing: C:\Users\Public\AppData\platform-tools\adb.exe -s HYF0218821022991 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 --ez verify-entry-points true com.example.big_randomizer/com.example.big_randomizer.MainActivity[ +245 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.big_randomizer/.MainActivity
(has extras) }

                    Error type 3
                    Error: Activity class {com.example.big_randomizer/com.example.big_randomizer.MainActivity} does not
                    exist.
[   +5 ms] Waiting for observatory port to be available...

这是AndroidStudio终端中最后几行的副本。之后什么都没有发生。

icnyk63a

icnyk63a1#

尝试从终端再次执行adb命令,并逐个删除参数以查找错误。

adb.exe -s HYF0218821022991 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 --ez verify-entry-points true com.example.big_randomizer/com.example.big_randomizer.MainActivity

在我例子中,没有找到生成活动的参数-a android.intent.action.RUN
因此,解决方案是添加动作意图过滤器到Android清单:

<activity android:exported="true" android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.RUN"/>
    </intent-filter>
</activity>

就是这样,卡住/应用程序不运行已解决。

相关问题