Flutter开发之Android Studio找不到Device File Explorer
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter开发之Android Studio找不到Device File Explorer相关的知识,希望对你有一定的参考价值。
参考技术A 之前更新了android studio之后,突然发现Device File Explorer不见了,打开view-》tool window 并没有找到,正常情况应该如下图上面是我经过设置之后才有的,还有下面的图也是能够正常查看手机
打开File-》Project Structure
进入Project Structure界面,选择左边Project,配置好对应的Android API
点击左边Facets,发现右边没有Android,就加一个
点击ok即可然后就可以正常看到右下角出现了Device File Explorer
Gradle 在 Android Studio 和 AppCenter 中都找不到 Flutter 构建的 APK
【中文标题】Gradle 在 Android Studio 和 AppCenter 中都找不到 Flutter 构建的 APK【英文标题】:Gradle can't find Flutter built APK, both in Android Studio and AppCenter 【发布时间】:2020-04-30 20:20:14 【问题描述】:当我尝试在本地或 AppCenter 上构建我的 Flutter 项目的 Android 版本时,我收到此错误,它找不到自己构建的 APK! :
...
[ ] BUILD SUCCESSFUL in 3m 51s
[ ] 904 actionable tasks: 903 executed, 1 up-to-date
[ +711 ms] Running Gradle task 'assembleRelease'... (completed in 232.8s, longer than expected)
[ +15 ms] "flutter apk" took 260,152ms.
Gradle build failed to produce an .apk file. It's likely that this file was generated under /Users/runner/runners/2.163.1/work/1/s/build, but the tool couldn't find it.
【问题讨论】:
您可以在这里找到答案:***.com/questions/51610420/… 【参考方案1】:你应该检查你的 appcenter-post-clone.sh 它应该是这样的
#!/usr/bin/env bash
#Place this script in project/android/app/
cd ..
# fail if any command fails
set -e
# debug log
set -x
cd ..
git clone -b beta https://github.com/flutter/flutter.git
export PATH=`pwd`/flutter/bin:$PATH
flutter channel stable
flutter doctor
echo "Installed flutter to `pwd`/flutter"
# build APK
flutter build apk --release
# if you need build bundle (AAB) in addition to your APK, uncomment line below and last line of this script.
#flutter build appbundle
# copy the APK where AppCenter will find it
mkdir -p android/app/build/outputs/apk/; mv build/app/outputs/apk/release/app-release.apk $_
# copy the AAB where AppCenter will find it
mkdir -p android/app/build/outputs/bundle/; mv build/app/outputs/bundle/release/app-release.aab $_
【讨论】:
以上是关于Flutter开发之Android Studio找不到Device File Explorer的主要内容,如果未能解决你的问题,请参考以下文章
Flutter 和 Android Studio:找不到 providerinstaller 的本地模块描述符类
环境配置之flutter与Android Studio之间的爱恨情仇(上万字与数十种报错的解决方案)
环境配置之flutter与Android Studio之间的爱恨情仇(上万字与数十种报错的解决方案)
Flutter配置好后,在Android Studio中找不到设备,no devices