android-studio

Exporting cocos2d Android application as aar and calling its Activity from another project

荒凉一梦 提交于 2020-07-10 10:25:18
问题 I had built a cocos2d Android project from cocos creator. (sample application) And I exported this android application as an android library (sample.aar) I created another Android application (MyDemo) and imported the android library (sample.aar) I am calling the AppActivity of (sample.aar) library from the MainActivity of (MyDemo) application on Button click aarButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(); intent

How to synchronize build variants among apps

淺唱寂寞╮ 提交于 2020-07-10 08:31:39
问题 I am working on a project that contains multiple applications. Several of them contain the same flavors. The same values on a flavor dimension, precisely. I would like to have their value synchronized, if possible automatically. Otherwise, I would like it to show there is a conflict. To summarize the situation, I would like the build variant selection pane to behave for unrelated applications of the same project the same as it works for module being a dependency of an app. How can I achieve

Android Studio offline add `Android plugin for Gradle`

南笙酒味 提交于 2020-07-10 07:44:42
问题 I use Android Studio 3.1.2 with Gradle 4.4 and have to force Gradle to do off-line work , because when I use it normally (on-line), it takes to long to sync and fails. At first I got this error: No cached version of com.android.tools.build:gradle:3.1.2 available for offline mode. Disable Gradle 'offline mode' and sync project So I downloaded gradle-3.1.2.jar , put it in <project root>/libs/ and change build.gradle of my project to this state: buildscript { repositories { google() jcenter()

Android studio 3.6.1: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

我怕爱的太早我们不能终老 提交于 2020-07-10 03:14:43
问题 I recently updated gradle and android studio to 3.6.1 version. but, it always fails to build apk file and show the following error: * What went wrong: Execution failed for task ':app:mergeReleaseResources'. > Multiple task action failures occurred: > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > AAPT2 aapt2-3.6.1-6040484-windows Daemon #4: Daemon startup failed Please check if you installed the Windows Universal C Runtime. This should not

Cannot create new activity android studio

扶醉桌前 提交于 2020-07-10 02:51:54
问题 I have a problem with android studio. I'm developing a project where I have so many activities. But now, I've updated Android Studio to version 3.4 (April 2019) and I can't create a new activity. The ide doesn't show any error message, I press New> Empty Activity and I write the name of the activity and press 'Finish' but nothing happens in the layout. Does anybody know what kind of error it is? Thanks. 回答1: open up the build at the bottom see if you get a hint.check if the directory path isn

Cannot create new activity android studio

故事扮演 提交于 2020-07-10 02:44:29
问题 I have a problem with android studio. I'm developing a project where I have so many activities. But now, I've updated Android Studio to version 3.4 (April 2019) and I can't create a new activity. The ide doesn't show any error message, I press New> Empty Activity and I write the name of the activity and press 'Finish' but nothing happens in the layout. Does anybody know what kind of error it is? Thanks. 回答1: open up the build at the bottom see if you get a hint.check if the directory path isn

Android Inserting Large Amount of Data Inside ROOM Database

人走茶凉 提交于 2020-07-09 12:13:45
问题 I have around 10 models each having records of more than 120K rows and 90 columns containing double array values. Inserting any of the models inside Room took more than 125-130 seconds. Can anyone suggest what I need to do in order to save all these 120K with some bulk insertion technique which takes around 1 or 2 seconds. Fetching any range of records are smooth and returns the sublist inside the bearable amount of time (less than a second). Below is DAO and repository methods which i am

try and catch while retrieving text form SQLite

半城伤御伤魂 提交于 2020-07-09 12:10:07
问题 I am fetching the SQLite's data in the textView and it is showing following error. I've also set permission of READ and WRITE_EXTERNAL_STORAGE in mainfest but still I'm getting this error: this is quotes.java file: public class quotes extends SQLiteOpenHelper { private static final String Database_name = "quotes.db"; private static final String Database_path = "/data/data/com.birnepal.entrancekoguide/databases/"; private static final String Table_name = "quotes"; private static final String

try and catch while retrieving text form SQLite

半世苍凉 提交于 2020-07-09 12:09:37
问题 I am fetching the SQLite's data in the textView and it is showing following error. I've also set permission of READ and WRITE_EXTERNAL_STORAGE in mainfest but still I'm getting this error: this is quotes.java file: public class quotes extends SQLiteOpenHelper { private static final String Database_name = "quotes.db"; private static final String Database_path = "/data/data/com.birnepal.entrancekoguide/databases/"; private static final String Table_name = "quotes"; private static final String

How to change Indentation Line Color In Android Studio 4.0?

荒凉一梦 提交于 2020-07-09 11:49:26
问题 I don't know what the name of this setting is. It's the (grayish) line that appears when you unfold a method, if, for, etc.. statement (see attached image). I want to change the color but can't find the option in the Android Studio 4.0 settings menu. Does anyone know what's it called and how to change it's color? thanks 回答1: Things have changed in android studio 4.0 In order to change the color of that indentation line do this Go to File -> Settings -> Editor -> Color Scheme -> General And