android-build

android.os.ServiceManager not found while building

只愿长相守 提交于 2020-01-01 17:25:18
问题 I am getting following error while building android source, where i have added my custom app which uses android.os.ServiceManager. cannot find symbol symbol : class ServiceManager location: package android.os import android.os.ServiceManager; Why am I facing this error, actually this import can be found in many other app in android source. I am building the android source as in http://source.android.com/source/building.html and also followed this post The import android.os.ServiceManager

Add custom.xml file to AOSP etc folder

孤街醉人 提交于 2020-01-01 12:24:09
问题 I wanted to add a resource file/ xml file to etc folder in AOSP. I would like to have my resource file available just like platform.xml file. So I basically added my xml file in AOSP/frameworks/base/data/etc folder and correspondingly added the following lines in the make file Android.mk ######################## include $(CLEAR_VARS) LOCAL_MODULE := custom.xml LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := ETC # This will install the file in /system/etc/permissions # LOCAL_MODULE_PATH :=

Build android shared lib using ndk-build without have jni folder

倖福魔咒の 提交于 2020-01-01 06:27:19
问题 I am able to build a android shared library using ndk-build only when all my src are in the jni foler, but, I would like to build a shared library using ndk-build without need jni folder, because my project doesn't have java code, so how could I do that? my simple Android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ctest LOCAL_SRC_FILES := main.cpp # for logging LOCAL_LDLIBS += -llog # for native asset manager LOCAL_LDLIBS += -landroid include $(BUILD_SHARED_LIBRARY

Build android shared lib using ndk-build without have jni folder

 ̄綄美尐妖づ 提交于 2020-01-01 06:27:11
问题 I am able to build a android shared library using ndk-build only when all my src are in the jni foler, but, I would like to build a shared library using ndk-build without need jni folder, because my project doesn't have java code, so how could I do that? my simple Android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ctest LOCAL_SRC_FILES := main.cpp # for logging LOCAL_LDLIBS += -llog # for native asset manager LOCAL_LDLIBS += -landroid include $(BUILD_SHARED_LIBRARY

android build release apk on jenkins, without storing my password in plain text

我们两清 提交于 2020-01-01 03:11:13
问题 I need to be able to build the release version of my apk, using a Jenkins job. From reading the following SO question How to create a release signed apk file using Gradle? I understand I can do it in one of two ways. Either get the user to enter the password at cmd prompt, or store my password details in a plain text file that doesn't get committed to git, and lives on my local machine. Neither of these will work when running the build job on jenkins though. 1) I can't gain user input because

multiDexKeepFile not working

无人久伴 提交于 2019-12-31 16:39:13
问题 We are having problems in building our multidex App. We keep receiving different java.lang.NoClassDefFoundError erros during the application boot. We noticed that they are very likely related to the multidex issues. As the required classes for booting the App must be present in the primary DEX file and they are not being included in the classes.dex . We performed the steps described in https://developer.android.com/studio/build/multidex.html#keep but the classes we specify in the multidex

String types not allowed (at 'blue' with value '')

旧城冷巷雨未停 提交于 2019-12-29 09:34:10
问题 I am getting following error in appcompat-v7 library building the project. Error:(380, 5) String types not allowed (at 'blue' with value ''). \app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\res\values\values.xml appcompat-v7 library values.xml file where this error is occuring: <!-- this line --> <style name="Base.TextAppearance.AppCompat.SearchResult" parent=""> <item name="android:textStyle">normal</item> <item name="android:textColor">?android:textColorPrimary

Cannot access ActivityCompatApi23 class

一曲冷凌霜 提交于 2019-12-29 08:33:09
问题 I am having runtime problems with my gradle file. I added this compile 'com.google.android:flexbox:0.3.1' as a compile time dependency to my Gradle file. I encountered an error and added this in my project level Gradle file. maven { url "https://maven.google.com" } Which finally looked liked this after adding the above allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } } After adding the above in my app level Gradle file I am now encountering a different error

Packaging linux binary in Android apk

ぃ、小莉子 提交于 2019-12-29 08:07:41
问题 If I want to include a linux binary (like ffmpeg) in my .apk file (only for ARM based devices), is this possible to distribute for non rooted phones? I know it's possible to call an included binary with Runtime.exec() but is it a recommended practice? 回答1: You can store the binary in res/raw or in assets folder. This way it will be deployed on the device. You should "extract" it after the installation, your /data/data/your.package/files/ is a valid destination; /sdcard/ is not. The usual

Could not delete path

主宰稳场 提交于 2019-12-28 06:30:20
问题 I have been facing these "Could not delete path" problems for months. To run my application, I always have to delete all my app/build files. But it is very time-consuming . Sometimes i have to restart android studio for run my application. Tried clean project and run. Tried clean project, build project and run. tried Invalidates caches / restart also but my app didn't run until i clear that project build folder. These are the errors I am getting alternatively. Can I reinstall Android Studio