gradle

Error while launching activity in Android Studio

爷,独闯天下 提交于 2021-02-08 05:56:05
问题 I am trying to make an Android Studio app that has more than one java file. However, when I was trying to run my app, it said: Error while executing: am start -n "com.example.company.appname/com.example.company.appname.Text" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.company.appname/.Text } Error type 3 Error: Activity class {com.example.company.appname/com.example

Create Gradle Tasks that executes other gradle task with parameters

▼魔方 西西 提交于 2021-02-08 05:15:15
问题 I use this gradle command to execute my UI-tests: ./gradlew connectedDebugAndroidTest -PUiTest I want to define a custom gradle task that executes my UI-tests, so I could this: task runUiTests() { dependsOn("connectedDebugAndroidTest") } How can I pass the parameter -PUiTest in my custom gradle task to the connectedDebugAndroidTest task? 来源: https://stackoverflow.com/questions/59284240/create-gradle-tasks-that-executes-other-gradle-task-with-parameters

Create Gradle Tasks that executes other gradle task with parameters

馋奶兔 提交于 2021-02-08 05:11:29
问题 I use this gradle command to execute my UI-tests: ./gradlew connectedDebugAndroidTest -PUiTest I want to define a custom gradle task that executes my UI-tests, so I could this: task runUiTests() { dependsOn("connectedDebugAndroidTest") } How can I pass the parameter -PUiTest in my custom gradle task to the connectedDebugAndroidTest task? 来源: https://stackoverflow.com/questions/59284240/create-gradle-tasks-that-executes-other-gradle-task-with-parameters

Kotlin Native iOS string formatting with vararg

隐身守侯 提交于 2021-02-08 04:59:50
问题 Based on this issue about using NSString formatting I try to implement multiplatform implementation for formatting when using vararg , with no luck so far. What I did added FoundationInterop.def language = Objective-C --- #import <Foundation/NSString.h> NSString* format(NSString* format, ...) { va_list args; va_start(args, format); NSString* result = [[NSString alloc] initWithFormat:format arguments:args]; va_end(args); return result; } compiled it in gradle targets { final def iOSTarget =

Proguard shrinking and optimizing without obfuscation

前提是你 提交于 2021-02-08 03:28:06
问题 In my app I have library project dependency with lots of unused methods fields and classes. Since this is a third-party library I don't want to remove all unused classes and methods by myself due it's future updates. I'm trying to use proguard for this but -dontobfuscate will only exclude whole project from any optimisations shrinking and obfuscation. Is it possible to skip obfuscation step? 回答1: You should generally apply ProGuard to the combination of your app and its libraries. This

Add external resources to jar in gradle from another project

你。 提交于 2021-02-07 22:56:35
问题 I have a project that has a "resources" library (not java based). It simply contains a hierarchy of files that are used by multiple java projects library files binaries etc In one of my java projects, I want to include these files in the assembled jar file // current definition of a sample project project("java_project") { // dependencies omitted jar { from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } manifest { attributes("Main-Class": "mymainclass") } } }

Gradle using 2 different JDK

三世轮回 提交于 2021-02-07 22:02:01
问题 I would like use some features from Java 9 and 10 in my PC java application which has common code with android app. When I use jdk 10 or jdk 9 android application is building, but it doesn't launch(it is throwing a lots of errors). When I use jdk 8 for whole project everything is working correctly without any error. When I manually build project using 2 different jdk everything is working fine. I tried set targetCompability and sourceCompability for android application for JavaVersion.Version

Gradle using 2 different JDK

我们两清 提交于 2021-02-07 22:01:40
问题 I would like use some features from Java 9 and 10 in my PC java application which has common code with android app. When I use jdk 10 or jdk 9 android application is building, but it doesn't launch(it is throwing a lots of errors). When I use jdk 8 for whole project everything is working correctly without any error. When I manually build project using 2 different jdk everything is working fine. I tried set targetCompability and sourceCompability for android application for JavaVersion.Version

Make “gradle javadoc” task work with Java 9

前提是你 提交于 2021-02-07 20:59:55
问题 I have a multi-module Gradle Java project using source/target = 1.9/1.9. There are two modules, my.base and my.dependsOnBase . The my.base module has no other dependencies: module my.base { exports my.base.foo; exports my.base.bar; } The my.dependsOnBase module has only a single dependency, which is my.base : module my.dependsOnBase { requires my.base; exports my.dependsOnBase.baz; } When I run $ gradle javadoc it works fine on my.base . But when it gets to my.dependsOnBase I get the

Make “gradle javadoc” task work with Java 9

血红的双手。 提交于 2021-02-07 20:58:35
问题 I have a multi-module Gradle Java project using source/target = 1.9/1.9. There are two modules, my.base and my.dependsOnBase . The my.base module has no other dependencies: module my.base { exports my.base.foo; exports my.base.bar; } The my.dependsOnBase module has only a single dependency, which is my.base : module my.dependsOnBase { requires my.base; exports my.dependsOnBase.baz; } When I run $ gradle javadoc it works fine on my.base . But when it gets to my.dependsOnBase I get the