Apr 30, 2019 In fact, you’d have to create a new one under a new name. For that, you will need to generate an upload key. Open your app in Android Studio by browsing to the android folder of your React Native project; Navigate to the Build tab, then click on Generate signed bundle / APK; Select APK to generate release APK for your React Native Android project. Then, Click on Next; Under Key store path. How do I Create a Self-Signed Certificate for an Android App? This lesson describes how to create a self-signed certificate for your Android application. Variations between Apple Mac and Windows are discussed and screen captures are provided.
Follow the Set up an editorinstructions to install the Dart and Flutter plugins.
Updates to the plugins are shipped on a regular basis.You should be prompted in the IDE when an update is available.
To check for updates manually:
dart
or flutter
are listed, update them.You can create a new project in one of several ways.
To create a new Flutter project from the Flutter starter app template:
When creating a new app, some Flutter IDE plugins ask for an organization name in reverse domain order, something like com.example
. Along with the name of the app, this is used as the package name for Android, and the Bundle ID for iOS when the app is released. If you think you might ever release this app, it is better to specify these now. They cannot be changed once the app is released. Your organization name should be unique.
To create a new Flutter project containing existing Flutter source codefiles:
In the IDE, click Create New Project from theWelcome window or File > New > Projectfrom the main IDE window.
Important: Do not use the New > Project from existing sources option for Flutter projects.
The Flutter plugin performs code analysis that enables the following:
Note: You can debug your app in a few ways.
The instructions below describe features available in Android Studio and IntelliJ. For information on launching DevTools, see Running DevTools from Android Studio in the DevTools docs.
Running and debugging are controlled from the main toolbar:
When a Flutter project is open in the IDE, you should see a set ofFlutter-specific buttons on the right-hand side of the toolbar.
Note: If the Run and Debug buttons are disabled, and no targets are listed, Flutter has not been able to discover any connected iOS or Android devices or simulators. You need to connect a device, or start a simulator, to proceed.
Note: If you want to try running your app on the web, but the Chrome (web) target doesn’t appear in the list of targets, make sure you’ve enabled web, as described in Building a web application.
Flutter offers a best-in-class developer cycle enabling you to see the effectof your changes almost instantly with the Stateful Hot Reload feature.See Hot reload for details.
Note: To examine performance issues in Flutter, see the Timeline view.
To view the performance data, including the widget rebuildinformation, start the app in Debug mode, and then openthe Performance tool window usingView > Tool Windows > Flutter Performance.
To see the stats about which widgets are being rebuilt, and how often,click Show widget rebuild information in the Performance pane.The exact count of the rebuilds for this frame displays in the secondcolumn from the right. For a high number of rebuilds, a yellow spinningcircle displays. The column to the far right shows how many times awidget was rebuilt since entering the current screen.For widgets that aren’t rebuilt, a solid grey circle displays.Otherwise, a grey spinning circle displays.
The app shown in this screenshot has been designed to deliver poor performance, and the rebuild profiler gives you a clue about what is happening in the frame that might cause poor performance. The widget rebuild profiler is not a diagnostic tool, by itself, about poor performance.
The purpose of this feature is to make you aware when widgets arerebuilding—you might not realize that this is happening when justlooking at the code. If widgets are rebuilding that you didn’t expect,it’s probably a sign that you should refactor your code by splittingup large build methods into multiple widgets.
This tool can help you debug at least four common performance issues:
The whole screen (or large pieces of it) are built by a singleStatefulWidget, causing unnecessary UI building. Split up theUI into smaller widgets with smaller build()
functions.
Offscreen widgets are being rebuilt. This can happen, for example,when a ListView is nested in a tall Column that extends offscreen.Or when the RepaintBoundary is not set for a list that extendsoffscreen, causing the whole list to be redrawn.
The build()
function for an AnimatedBuilder draws a subtree thatdoes not need to be animated, causing unnecessary rebuilds of staticobjects.
An Opacity widget is placed unnecessarily high in the widget tree.Or, an Opacity animation is created by directly manipulating theopacity property of the Opacity widget, causing the widget itselfand its subtree to rebuild.
You can click on a line in the table to navigate to the linein the source where the widget is created. As the code runs,the spinning icons also display in the code pane to help youvisualize which rebuilds are happening.
Note that numerous rebuilds doesn’t necessarily indicate a problem.Typically you should only worry about excessive rebuilds if you havealready run the app in profile mode and verified that the performanceis not what you want.
And remember, the widget rebuild information is only available ina debug build. Test the app’s performance on a real device in a profilebuild, but debug performance issues in a debug build.
If you have additional tips we should share, let us know!
Assists are code changes related to a certain code identifier.A number of these are available when the cursor is placed on aFlutter widget identifier, as indicated by the yellow lightbulb icon.The assist can be invoked by clicking the lightbulb, or by using thekeyboard shortcut (Alt
+Enter
on Linux and Windows,Option
+Return
on macOS), as illustrated here:
Quick Fixes are similar, only they are shown with a piece of code has an errorand they can assist in correcting it. They are indicated with a red lightbulb.
This can be used when you have a widget that you want to wrap in a surroundingwidget, for example if you want to wrap a widget in a Row
or Column
.
Similar to the assist above, but for wrapping an existing list ofwidgets rather than an individual widget.
Changes a child argument to a children argument,and wraps the argument value in a list.
Live templates can be used to speed up entering typical code structures.They are invoked by typing their prefix, and then selecting it in the codecompletion window:
The Flutter plugin includes the following templates:
stless
: Create a new subclass of StatelessWidget
.stful
: Create a new subclass of StatefulWidget
andits associated State subclass.stanim
: Create a new subclass of StatefulWidget
and itsassociated State subclass, including a field initialized with anAnimationController
.You can also define custom templates in Settings > Editor > Live Templates.
Hot reload
On Linux (keymap Default for XWin) and Windows the keyboard shortcutsare Controle
+Alt
+;
and Control
+Backslash
.
On macOS (keymap Mac OS X 10.5+ copy) the keyboard shortcuts areCommand
+Option
and Command
+Backslash
.
Keyboard mappings can be changed in the IDE Preferences/Settings: SelectKeymap, then enter flutter into the search box in the upper right corner.Right click the binding you want to change and Add Keyboard Shortcut.
Hot reload works by injecting updated source code files into the runningDart VM (Virtual Machine). This includes not only adding new classes,but also adding methods and fields to existing classes,and changing existing functions.A few types of code changes cannot be hot reloaded though:
main()
method of the appFor these changes you can fully restart your application,without having to end your debugging session. To perform a hot restart,don’t click the Stop button, simply re-click the Run button (if in a runsession) or Debug button (if in a debug session), or shift-click the ‘hotreload’ button.
Opening the root directory of a Flutter project doesn’t expose all the Androidfiles to the IDE. Flutter apps contain a subdirectory named android
. If youopen this subdirectory as its own separate project in Android Studio, the IDEwill be able to fully support editing and refactoring all Android files (likeGradle scripts).
If you already have the entire project opened as a Flutter app in AndroidStudio, there are two equivalent ways to open the Android files on their ownfor editing in the IDE. Before trying this, make sure that you’re on the latestversion of Android Studio and the Flutter plugins.
android
. Right click on it,then select Flutter > Open Android module in Android Studio.android
subdirectory forediting. You should then see a “Flutter commands” banner at the top of theeditor with a link labeled Open for Editing in Android Studio.Click that link.For both options, Android Studio gives you the option to use separate windows orto replace the existing window with the new project when opening a secondproject. Either option is fine.
If you don’t already have the Flutter project opened in Android studio,you can open the Android files as their own project from the start:
android
subdirectory immediately under the flutter app root.For example if the project is called flutter_app
,open flutter_app/android
.If you haven’t run your Flutter app yet, you might see Android Studio report abuild error when you open the android
project. Run flutter pub get
inthe app’s root directory and rebuild the project by selecting Build > Maketo fix it.
To enable editing of Android code in IntelliJ IDEA, you need to configure thelocation of the Android SDK:
flutter doctor
).Important known issues that might impact your experience are documentedin the Flutter plugin README file.
All known bugs are tracked in the issue trackers:
We welcome feedback, both on bugs/issues and feature requests.Prior to filing new issues:
When filing new issues, include the output of flutter doctor
.