android studio是啥?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android studio是啥?相关的知识,希望对你有一定的参考价值。
参考技术Aandroid Studio 是谷歌推出的一个Android集成开发工具,基于IntelliJ IDEA。
Android Studio 提供的功能:
1、基于Gradle的构建支持。
2、Android 专属的重构和快速修复。
3、提示工具以捕获性能、可用性、版本兼容性等问题。
4、支持ProGuard 和应用签名。
5、基于模板的向导来生成常用的 Android 应用设计和组件。
6、功能强大的布局编辑器,可以让你拖拉 UI 控件并进行效果预览。
扩展资料:
Android Studio 提供自动构建、依赖项管理和可自定义的构建配置功能。可以将项目配置为包含本地库和托管库,定义包含不同代码和资源的构建变体,并应用不同的代码收缩和应用签名配置。
Android Studio 集成有诸多版本控制工具,例如 GitHub 和 Subversion,让团队能够与项目和构建变更保持同步。利用开源 Gradle 构建系统,可以根据自己的环境量身定制构建,并在一台持续性集成服务器(如 Jenkins)上运行构建。
Android Studio 提供了统一的环境,可在其中开发适用于 Android 手机、平板电脑、Android Wear、Android TV 以及 Android Auto 的应用。可以利用结构化代码模块将项目细分成可独立构建、测试和调试的若干功能单元。
参考资料来源:
百度百科——Android Studio
Android官网——Android官网
在 Android Studio 中开发的 Flutter 项目的合法 .gitignore 是啥?
【中文标题】在 Android Studio 中开发的 Flutter 项目的合法 .gitignore 是啥?【英文标题】:What is a legit .gitignore for a Flutter project that is developed in Android Studio?在 Android Studio 中开发的 Flutter 项目的合法 .gitignore 是什么? 【发布时间】:2019-02-16 13:28:57 【问题描述】:对于在 Android Studio 中开发的 Flutter 项目,什么是合法的 .gitignore?
这是我目前所拥有的,但是当我在 Android Studio 中打开项目时,我无法启用 Dart 支持或浏览项目。
#flutter specific
.flutter-plugins
.DS_Store
.dart_tool/
.packages
.pub/
build/
android/app/google-services.json
.idea/
android/key.properties
pubspec.lock
doc/api/
#ios specific
ios/.generated/
ios/Podfile*
ios/Flutter/Debug.xcconfig
ios/Flutter/Release.xcconfig
ios/Runner.xcworkspace/contents.xcworkspacedata
#android specific
android/app/google-services.json
android/key.properties
# User-specific
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
# File-based project format
*.iws
# IntelliJ
out/
【问题讨论】:
你试过 gitignore.io 吗?那里通常有一些相当合理的默认值:gitignore.io/api/android,flutter,androidstudio 当你创建一个新的 Flutter 项目时,已经创建了一个.gitignore
文件。那个文件有什么问题?此文件与“启用 Dart 支持”无关。
您“启用 Dart 支持”的问题是因为您的 .gitignore 中的 .idea。 .idea 的 codeStyle 可以让 Android Studio 将您的项目识别为 dart 项目。另请查看this link,了解如何为颤振项目制作 .gitignore。
应该忽略*.g.dart
吗?
【参考方案1】:
你可以在Github here的flutter官方项目中找到它:
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Visual Studio Code related
.classpath
.project
.settings/
.vscode/
# Flutter repo-specific
/bin/cache/
/bin/internal/bootstrap.bat
/bin/internal/bootstrap.sh
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
/dev/bots/android_tools/
/dev/devicelab/ABresults*.json
/dev/docs/doc/
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version
analysis_benchmark.json
# packages file containing multi-root paths
.packages.generated
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
**/generated_plugin_registrant.dart
.packages
.pub-cache/
.pub/
build/
flutter_*.png
linked_*.ds
unlinked.ds
unlinked_spec.ds
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
*.jks
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/.last_build_id
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# macOS
**/macos/Flutter/GeneratedPluginRegistrant.swift
# Coverage
coverage/
# Symbols
app.*.symbols
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
这里只是对.gitgnore
文件进行更改以确保 Git 始终跟踪正确的文件时需要注意的几点。
-
在
.gitignore
文件中进行更改。
运行git rm -r --cached .
命令。
运行git add .
命令
【讨论】:
【参考方案2】:这是 Flutter 2.2 的合法 .gitignore,取自 Very Good Core cli
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/*
# Visual Studio Code related
.classpath
.project
.settings/
.vscode/*
# Flutter repo-specific
/bin/cache/
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
/dev/bots/android_tools/
/dev/docs/doc/
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version
# packages file containing multi-root paths
.packages.generated
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
build/
flutter_*.png
linked_*.ds
unlinked.ds
unlinked_spec.ds
.fvm/
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
**/android/.idea/
*.jks
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/.last_build_id
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# Coverage
coverage/
# Submodules
!pubspec.lock
packages/**/pubspec.lock
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Exceptions to the above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!.vscode/launch.json
!.idea/codeStyles/
!.idea/dictionaries/
!.idea/runConfigurations/
【讨论】:
【参考方案3】:VSCode 提供了这一点,并且和 android studio 版本一样好
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
【讨论】:
【参考方案4】:这是一致的 .gitignore
对于 Dart 和 Flutter 项目的所有编辑器
https://github.com/flutter/flutter/issues/13892#issue-285842688
【讨论】:
【参考方案5】:这是Android Studio自动生成的.gitignore,希望这是你要找的:
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Visual Studio Code related
.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
/build/
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
【讨论】:
应该忽略*.g.dart
吗?
不应该也忽略 pubspec.lock 吗?
应为应用程序提交:“对于应用程序包,请提交 pubspec.lock。此文件是应用程序等非共享资源管理其依赖项的推荐方式。” dart.dev/guides/libraries/private-files
对于库包,不要提交 pubspec.lock 文件。重新生成 pubspec.lock 文件可以让您根据其依赖项的最新兼容版本测试您的包。请参阅dart.dev/guides/libraries/private-files#pubspeclock 了解更多信息。以上是关于android studio是啥?的主要内容,如果未能解决你的问题,请参考以下文章
android studio中的linearlayout是啥意思