android-build

Minimum Necessary files for an android build

强颜欢笑 提交于 2021-02-08 11:15:27
问题 Trying to find the bare minimum source and build files needed to build an android project in Android Studio. I want to publish to github and avoid uploading generated build files or binaries. I do have a Android.gitignore from but I still see some more files getting pushed into the repo which may not be necessary. I understand the few obvious ones but about others, do I need them and if so kindly explain the usage. So the question, do I need the following and if so then a short description of

Annotation processor not working - no files are created

前提是你 提交于 2021-02-07 19:22:12
问题 I've now searched for reasons why my own annotation processor is not working in ONE of my projects. Setup looks like following: Android Studio 2.3.3 gradle build tools 2.3.3 annotation processor is enabled in android studio I tried the common solutions: remove my project from Android Studio recents invalidate cache and restart android studio import my project again into android studio (made sure that annotation processing is enabled before) Nothing helps. I have annotation processing working

Android studio: Parameter 'directory' is not a directory

有些话、适合烂在心里 提交于 2021-02-07 12:22:13
问题 When I try to build my project, I get such a mistake: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:dataBindingGenBaseClassesDebug'. > Parameter 'directory' is not a directory 回答1: From an answer to a similar question: Delete the .gradle directory (in the project base directory) Invalidate Caches and restart Android Studio. 来源: https://stackoverflow.com/questions/63372379/android-studio-parameter-directory-is-not-a-directory

Using NDK header when building vendor module with VNDK enabled

允我心安 提交于 2021-01-28 05:34:49
问题 I have a native vendor module built with AOSP (android 9.0.0_r35). This module uses android/input.h header. Note that this header is included in the android NDK. When enabling the VNDK, building module fails with fatal error: 'android/input.h' file not found error. This is caused by android build system (see compiler.go) who does not export the CommonGlobalIncludes when VNDK is enabled so frameworks/native/include (containing input.h) is not in include list. I tried adding libandroid to LOCAL

Unable to build : How to add Android Build Config for new Module

Deadly 提交于 2021-01-27 07:16:18
问题 Now i am converting my android code to modularized architectural approach. Facing issues when trying add a dependency on "app" module from "chat" module. I have the following build config for the "app" module. android { lintOptions { checkReleaseBuilds false abortOnError false } signingConfigs { companydevconfig { keyAlias 'company' keyPassword '123456' storeFile file('../app/jksFils/company_dev.jks') storePassword '123456' } companyqaconfig { keyAlias 'company' keyPassword '123456' storeFile

Picking a specific build type in a dependency

百般思念 提交于 2021-01-22 00:56:07
问题 Suppose I have an Android app with three build types: buildTypes { release { .... } optRelease { .... } debug { .... } } And I have a dependent module: dependencies { implementation project(':myDependency') } Suppose this dependency only has two build types (let's say debug and release ), and I want full control over which of my app's build types uses which of the dependency's build types. For example, I'd like my app's optRelease to use the library's release , and the app's release the use

android signed apk / net.sourceforge.jtds errors

三世轮回 提交于 2020-08-05 08:58:40
问题 I'm trying to build a signed apk (release) using proguard, but when generating the APK android studio reports several warnings related to "net.sourceforge.jtds" like this: Warning:net.sourceforge.jtds.jdbcx.JtdsDataSource: can't find superclass or interface javax.sql.XADataSource Warning:net.sourceforge.jtds.jdbcx.JtdsDataSource: can't find superclass or interface javax.naming.Referenceable ... and finally ends with an error: Error:Execution failed for task ':app

Which Android sdkmanager version to use?

北慕城南 提交于 2020-07-10 10:25:25
问题 I've followed the steps from Jing Li's answer for this question. My initial directory structure for Android was: $ tree -L 3 ~/Programs/ ~/Programs/ └── Android └── cmdline-tools └── tools I added these lines to .bashrc : export ANDROID_SDK_ROOT=$HOME/Programs/Android export ANDROID_HOME=$ANDROID_SDK_ROOT export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools:$PATH export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/bin:$PATH export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/lib:$PATH export PATH=

How to execute a gradle task after android dexDebug or dexRelease task

馋奶兔 提交于 2020-03-22 09:05:08
问题 The bounty expires in 9 hours . Answers to this question are eligible for a +50 reputation bounty. Arjun T Raj is looking for an up-to-date answer to this question. I want to run a Gradle task to execute some shell scripts after dexRelease or dexDebug task during the android build. I have tried the below approach task taskAfterDex(type:Exec) { workingDir '.' executable 'sh' args "-c", "source scriptskAfterDex.sh" ignoreExitValue true doLast { println "taskAfterDex completed" } } tasks

How to execute a gradle task after android dexDebug or dexRelease task

浪子不回头ぞ 提交于 2020-03-22 09:04:26
问题 The bounty expires in 9 hours . Answers to this question are eligible for a +50 reputation bounty. Arjun T Raj is looking for an up-to-date answer to this question. I want to run a Gradle task to execute some shell scripts after dexRelease or dexDebug task during the android build. I have tried the below approach task taskAfterDex(type:Exec) { workingDir '.' executable 'sh' args "-c", "source scriptskAfterDex.sh" ignoreExitValue true doLast { println "taskAfterDex completed" } } tasks