android-studio

Why does the notification not show up in API 28?

二次信任 提交于 2020-02-14 21:36:49
问题 I have looked at android documentation and I have seen all the answers in StackOverflow, however, I cannot seem to understand why the notification I am trying to show not show up. Whenever I click the button, instead of notification showing up, the app crashes, can someone please give me insight as to why this is occurring? notify_me.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

Can Not Perform Copy-Paste in Android Studio

若如初见. 提交于 2020-02-13 09:48:47
问题 I have faced two main problems in Android Studio. First of all I can not perform copy-paste and cut-paste ( ctrl + c - ctrl + v - ctrl + x ) abilities in some classes. To fix that problem, I click "invalide caches/restarts", but it breaks down again immediately. Second problem is (I think it is related to the first problem) compiler does not recognize already defined methods and attributes. Auto suggestion etc. does not work. The steps I've taken to try to fix the problem are; File ->

Can Not Perform Copy-Paste in Android Studio

落爺英雄遲暮 提交于 2020-02-13 09:46:48
问题 I have faced two main problems in Android Studio. First of all I can not perform copy-paste and cut-paste ( ctrl + c - ctrl + v - ctrl + x ) abilities in some classes. To fix that problem, I click "invalide caches/restarts", but it breaks down again immediately. Second problem is (I think it is related to the first problem) compiler does not recognize already defined methods and attributes. Auto suggestion etc. does not work. The steps I've taken to try to fix the problem are; File ->

android.support.v7.internal.widget.ActionBarOverlayLayout could not be instantiated

ぃ、小莉子 提交于 2020-02-10 21:31:51
问题 I installed (Android studio 1.2 + SDK pack) for the first time, I created a test project with demo tab activity. I have not written a single line of code, everything has been generated by Android Studio In fragment_main.xml the following problem occurs. java.lang.ClassNotFoundException: android.support.v4.view.ViewPropertyAnimatorListener at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:127) at com.android.tools.idea.rendering.RenderClassLoader.findClass

android.support.v7.internal.widget.ActionBarOverlayLayout could not be instantiated

僤鯓⒐⒋嵵緔 提交于 2020-02-10 21:31:14
问题 I installed (Android studio 1.2 + SDK pack) for the first time, I created a test project with demo tab activity. I have not written a single line of code, everything has been generated by Android Studio In fragment_main.xml the following problem occurs. java.lang.ClassNotFoundException: android.support.v4.view.ViewPropertyAnimatorListener at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:127) at com.android.tools.idea.rendering.RenderClassLoader.findClass

No resource identifier found for attribute 'layout_behavior' in package

别来无恙 提交于 2020-02-09 05:19:47
问题 My application worked fine until I tried to add a library to it. After I added the library, Android Studio gives me the following error: Error:(26) No resource identifier found for attribute 'layout_behavior' in package 'inf..' This is my build.gradle file: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:support-v4:23.0.1' compile 'com.ogaclejapan.smarttablayout:utils-v4:1.3.0@aar' compile 'com

Android Studio Vector Asset Tool Content not allowed in prolog

做~自己de王妃 提交于 2020-02-07 02:35:15
问题 I am trying to create a splash screen for one of my apps with it's logo and my companies logo on it. To make sure I get no resizing problems I wanted to use SVG files and create a vector asset using the Android Studios built in tool. However when I want to create an asset using New > Vector Asset and then Local File and provide the path to my SVG file I get following error: Error while parsing logo.svg: Content is not allowed in prolog. . I created my SVG file using Paint and my logos PNG

Android and Socket.io , send and receive data

纵饮孤独 提交于 2020-02-06 08:44:01
问题 I can send data to server.js and it work well but i can't receive data from server.When i click button server.js gets data i think Server.js send data but my App need some code to get data. enter image description here My server.js work well var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); app.get('/', function(req, res){ res.send('<h1>Hello world</h1>'); }); io.on('connection',function(socket){ console.log('one user connected '

Android and Socket.io , send and receive data

亡梦爱人 提交于 2020-02-06 08:43:45
问题 I can send data to server.js and it work well but i can't receive data from server.When i click button server.js gets data i think Server.js send data but my App need some code to get data. enter image description here My server.js work well var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); app.get('/', function(req, res){ res.send('<h1>Hello world</h1>'); }); io.on('connection',function(socket){ console.log('one user connected '

Android Studio 3.5.2 Project Build Problem because of “Multiple dex files define”

自古美人都是妖i 提交于 2020-02-06 08:35:33
问题 I recently took over work on an Android Studio project whose active development was stopped 18 months ago, in July 2018. I have been able to build a debug version of the product, but not release. The build is failing on trying to build a new productFlavor that I added today. This is the build error: Multiple dex files define Landroid/support/v13/view/inputmethod/InputConnectionCompat$OnCommitContentListener; After syncing with the gradle in the build.,gradle for module App, new build variants