gradle

Active build variant does not have a test artifact

烂漫一生 提交于 2020-12-29 11:47:29
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

Active build variant does not have a test artifact

こ雲淡風輕ζ 提交于 2020-12-29 11:45:23
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

手把手教你玩转Flutter之Flutter环境搭建

不想你离开。 提交于 2020-12-29 11:37:25
手把手教你玩转Flutter之Flutter环境搭建 文章目录 目录 前言 一、配置国内镜像 二、下载Flutter SDK 1.官网下载 2.配置环境变量 3.验证Flutter是否安装成功 三、安装配置Android Studio 1.安装Android Studio 2.安装Flutter和Dart插件 3.检查Flutter环境 四、第一个Flutter应用 1.搭建Flutter应用 2.运行Flutter应用 3.常见问题记录 参考资料: 前言 Flutter 是 Google 开源的 UI 工具包,帮助开发者通过一套代码库高效构建多平台精美应用,支持移动、Web、桌面和嵌入式平台。 同时,通过Flutter框架开发的移动端应用,可以在Anroid和IOS中完美使用,不需要再单独开发Android或IOS版本,目前Flutter已经成为移动端开发热门的工具。 提示:本文是以Windows为例,记录了在Windows操作系统中构建Flutter开发环境的步骤。 一、配置国内镜像 Flutter官方为国内开发者设立了镜像,在开始配置Flutter环境时,首先要进行配置。需要我们在环境变量中加入如下两个环境变量: export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL

difference between android gradle plugin and gradle

。_饼干妹妹 提交于 2020-12-29 09:27:09
问题 Android Studio 3.2 Canary 5 Build #AI-173.4630681, built on March 3, 2018 JRE: 1.8.0_152-release-1136-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.4-300.fc27.x86_64 I have just started a new project and when I sync'd I got this dialog box. I am just wondering what is the difference between the Android Gradle Project and Gradle. How would I upgrade to Gradle to version 4.5? What is the purpose of both of these? Many thanks in advance 回答1: Even if you have written the

Android Studio refuses to run main()

徘徊边缘 提交于 2020-12-29 09:19:03
问题 Repro steps: Start a new project in Android Studio (with the latest update); Make a new class and add main() as usual; Right-click class to run main() as a test. package test; public class Test { public static void main(String[] args) { } } Usually I expect I can just System.out.printLn("Hello World") but this time, no matter if it's a new project, I get the following error: 2:34:23 PM: Executing task 'Test.main()'... Executing tasks: [Test.main()] in project C:\Users\regan\Desktop\events

How to add a dependency to another project properly using gradle?

巧了我就是萌 提交于 2020-12-29 05:38:22
问题 Hello I am new to gradle and it is a little bit confusing for me. How should I add a dependency in my gradle configuration to have access to B1.java in projectA1 ? Project B is gradle project and project A is just a folder with another gradle projects. Here is my structure: Workspace: ProjectA projectA1 ... here I want to have access to B1.java build.gradle projectA2 ... build.gradle ProjectB projectB1 B1.java ... build.gradle projectB2 ... build.gradle build.gradle I tried to read gradle

How to build Google protocol buffers and Kotlin using Gradle?

南笙酒味 提交于 2020-12-29 05:29:19
问题 I'm trying to build a project that uses both Google protocol buffers and Kotlin using Gradle. I want the proto files to compile into Java source, which is then called from my Kotlin code. My source files are arranged like this: src/main/proto/*.proto src/main/kotlin/*.kt src/test/kotlin/*.kt Here's my build.gradle file: version '1.0-SNAPSHOT' apply plugin: 'kotlin' apply plugin: 'java' apply plugin: 'com.google.protobuf' repositories { mavenCentral() maven { url "http://dl.bintray.com/kotlin

Android Studio导入第三方类库的方法

会有一股神秘感。 提交于 2020-12-28 10:15:43
引用https://www.cnblogs.com/neozhu/p/3458759.html 导入*.jar包 新建好了Android项目,添加一个第三方已经打包好的jar文件进你项目,下面就已添加一个odata4j的一个包 在项目中添加一个libs文件 直接通过COPY/PAST 把你下载的jar文件添加到libs文件夹下 然后在libs文件夹和添加的*.jar文件下鼠标单击菜单 add as library 然后在选择项目单击Open Module Settings,在Dependencies中选择添加文件 这样就完成了jar文件添加 打开App目录下有个build.gradle文件应该项目结构文件,上述的动作只是为了在在文件下添加 dependencies { compile files('libs/android-support-v13.jar') compile files('libs/odata4j-0.7.0-clientbundle.jar') } 导入第三方java类库含源代码包 下面演示如何在本项目中导入第三方的源代码类库,这里例子是导入Httpzoid一个json http client类库 先从github上下载zip包解压后把Httpzoid目录copy到你项目的目录下 添加后android studio的项目下会自动出现这个目录

Android--图片轮播(banner)

廉价感情. 提交于 2020-12-28 10:08:40
使用步骤 Step 1.依赖banner Gradle dependencies{ compile 'com.youth.banner:banner:1.4.10' //最新版本 } 或者引用本地lib compile project(':banner') Step 2.添加权限到你的 AndroidManifest.xml <!-- if you want to load images from the internet --> < uses-permission android:name= "android.permission.INTERNET" /> <!-- if you want to load images from a file OR from the internet --> < uses-permission android:name= "android.permission.READ_EXTERNAL_STORAGE" /> Step 3.在布局文件中添加Banner,可以设置自定义属性 !!!此步骤可以省略,直接在Activity或者Fragment中new Banner(); < com.youth.banner.Banner xmlns:app= "http://schemas.android.com/apk/res-auto" android:id=

一个很Nice的Android Banner轮播图库

旧时模样 提交于 2020-12-28 09:43:24
Android小白一枚,最近项目中有一个轮播图的需求,网上搜了很多资料,也看了多开源库,但不是bug多就是库不维护。后来在GitHub上找到一个很棒的轮播图– BannerViewPager 库推荐个大家。 它的使用方法很简单,也是我看过其他库里边使用最简单的一个。 1.gradle中添加依赖 在项目的root build.gradle中添加如下配置,这个配置是需要添加到项目根目录下的gradel文件中的。 allprojects { repositories { . . . maven { url 'https://www.jitpack.io' } } } 然后在项目app目录下的gradle中添加BannerViewPager的依赖: implementation 'com.github.zhpanvip:BannerViewPager:3.4.0' 然后在Activity的布局文件中添加BannerViewPager: < com.zhpan.bannerview.BannerViewPager android: id = " @+id/banner_view " android: layout_width = " match_parent " android: layout_margin = " 10dp " android: layout_height = "