android-studio

android studio sdk version 22 exception during rendering: action_bar

守給你的承諾、 提交于 2020-01-22 04:56:21
问题 When I create a new project on android studio it is not giving any problem. However, looking at the activity_main.xml design it is shows me this: Rendering Problems Exception raised during rendering: action_bar. when I change sdk level 22 to 21 from the design page android studio shows nothing How can I solve this problem? This is not important problem but I wondered how can I fix this. 回答1: Yeah just had to adjust the Android level in the drop down. The design tab preview in API level 22 is

what should i do to run this play again button, app crashes when its pressed(making a tic tac toe game)?

时光怂恿深爱的人放手 提交于 2020-01-22 03:31:25
问题 plz help me out in this problem i tried many changes that were suggested in android studio basically the problem occurs in playAgain function it crashes but it shold clear the images im the imageviews main activity package com.example.xo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.GridLayout; import android.widget.ImageView; import android.widget.TextView; public class MainActivity

LibGDX How to put the game in the table? *** FIXED ***

不想你离开。 提交于 2020-01-22 02:31:06
问题 I have a game screen in which I want to implement both the game itself and the control buttons. I divided this screen into two parts using TABLE. The control buttons and the game are implemented in different classes. Everything works correctly, except for displaying the game. How to make the game fit in the top window? Game Screen code public class GameScreen implements Screen { private Main parent; private Stage stage; public static SnakeControl snakeControl; private SpriteBatch batch;

How do i make a switch that changes my picture depending on which weather id is in a json

放肆的年华 提交于 2020-01-22 02:29:08
问题 I have a weather app that is lacking changing icons/pictures depending on what the weather is, i have searched for hours but not found a solution. Im using openweathermap api, and would like to make a switch statement that changes my picture depending on what the weather id is. Here is my WeatherActivity.java . package com.inducesmile.androidweatherapp; import android.Manifest; import android.app.Service; import android.content.DialogInterface; import android.content.Intent; import android

How to solve this error: Android resource linking failed?

爷,独闯天下 提交于 2020-01-22 02:16:25
问题 These two codes below are in the same MainActivity, in my Android Studio project 1) Recoding the audio from smartphone and playing it when pressing Play button: public class Main2Activity extends AppCompatActivity { //Declare variables Button btnRecord, btnStopRecord, btnPlay, btnStop; //String pathSave =""; private static String pathSave; MediaRecorder mediaRecorder; MediaPlayer mediaPlayer; final int REQUEST_PERMISSION_CODE=1000; @Override protected void onCreate(Bundle savedInstanceState)

How to i know android app supports 64bit?

ε祈祈猫儿з 提交于 2020-01-22 02:15:49
问题 I have changed the gradle to something like this, which is in accordance with the documentation from Google Dev. then how do I know if my application supports 64 bits? I tried with Build -> Analyze APK, but I did not find the lib folder or file with the format .so. how to solved this? 回答1: The 64 bit change only affects apps that use "native code", ie code that compiles for the processor on the device, as opposed to being written in Java or Kotlin. This will only be true for you if: You have

Cannot update the app after updating SDK (app not installed)

旧时模样 提交于 2020-01-21 21:54:27
问题 After updating SDK and installing build tools etc I'm not able to update the app. Although it works after uninstalling and re-installing, but that seems odd to me for the customers. I also checked AndroidManifest, everything is OKAY, VersionCode, VersionName and Package etc. Here are the logs: 02-17 12:29:51.593 920-1110/? I/InputDispatcher: Delivering touch to (8187): action: 0x1, toolType: 1 02-17 12:29:51.613 8187-8187/? I/Timeline: Timeline: Activity_launch_request id:com.android

How to point settings location of Android Studio to a different custom location?

大城市里の小女人 提交于 2020-01-21 20:33:07
问题 I have the following problem. I have two Android Studio in my system. One is the stable version and the other is the Canary version. When I updated them, unfortunately I messed up in the 'Complete Installation' screen. It asked for importing settings from custom location and I gave the wrong location. Initially by Canary version was pointing to C:\Users\myUserName.AndroidStudioPreview1.4 and Stable version was pointing to C:\Users\myUserName.AndroidStudio1.4 . But after the update both are

Android Project Structure is incorrect; only one build.gradle

孤街醉人 提交于 2020-01-21 13:35:20
问题 I have an incorrect project structure. I need a top-level build-gradle, and a module on the same level that contains its own build.gradle . See picture of how it is organized now. What you see is almost two different levels merged into on.e The build.gradle here is the only one in the project. The one you see has the note that it is the top-level version. What is the correct way to straighten this out? Do I need to reimport or can I reorganize it? Other info, I have Gradle 2.10 installed.

Execution failed for task :app:processDebugManifest Android Studio 2.3.3

回眸只為那壹抹淺笑 提交于 2020-01-21 12:15:28
问题 I'm getting a compile error after adding CardView and RecyclerView dependencies, I've checked every post but no one seems to solve this case. Error: Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 is also present at [com.android.support:cardview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).