问题
I want to work with some files in flutter and so I wanted to use the Android Studio Device File Explorer to check if everything works correctly. But the Device File Explorer shows a red warning "Error initializing ADB: Android Debug Bridge not found"
On a "normal" Android Project with Java there is no Problem and everything is displayed correctly.
I reinstalled Android Studio, changed the AVD but nothing changed.
Is this a bug in Flutter or Android Studio? Thanks for helping.
回答1:
Ok, I solved the problem. You must go to your Project Structure, add a Project SDK to your project and reopen Android Studio. Then the Problem should be solved.
回答2:
The error might occur when you create a Flutter app in VS Code instead of Android Studio. To fix it, simply add a misc.xml
file in your .idea
folder, with the following contents or similar:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_12" default="false" project-jdk-name="Android API 29 Platform" project-jdk-type="Android SDK" />
<component name="ProjectType">
<option name="id" value="io.flutter" />
</component>
</project>
You could also create a new Flutter project in Android Studio to view the contents of misc.xml
as it might differ slightly.
来源:https://stackoverflow.com/questions/57291708/error-initializing-adb-debug-bridge-not-found