Jan 23 | 8:50 AM |
Mark M. | has entered the room |
Jan 23 | 8:55 AM |
Mark M. | turned on guest access |
Jan 23 | 9:15 AM |
Micalet | has entered the room |
Micalet |
Good morning
|
Mark M. |
hello, Micalet!
|
Mark M. |
how can I help you today?
|
Micalet |
I hope so
|
Micalet |
;-)
|
Micalet |
I have an app that show a notification if there are updates in a rss
|
Micalet |
when you click in the notification, the news activity is opened
|
Micalet |
and the notification disappear
|
Micalet |
but I want to know how to remove the notifications if I open the news activity from the app, and not from the notification
|
Mark M. |
call cancel() or cancelAll() on NotificationManager
|
Mark M. |
cancel() cancels a single Notification, given its ID
|
Mark M. |
cancelAll() cancels all your outstanding Notifications
|
Micalet |
but I have to call it from my news activity or from the service that send the notification?
|
Jan 23 | 9:20 AM |
Mark M. |
from anywhere in your app
|
Micalet |
i have to make any cheking before? for example: if(notificationisshown=true){cancel...}
|
Mark M. |
no, you are welcome to blindly cancel() if you like
|
Micalet |
is ther any problem if I call cancel() and the nofication is not showing?
|
Mark M. |
no, there should be no exceptions raised or anything like that
|
Micalet |
ok
|
Micalet |
I'm going to try it
|
Micalet |
thank you
|
Mark M. |
you are very welcome
|
Jan 23 | 9:25 AM |
Mark M. |
if you have other questions, go right ahead
|
Jan 23 | 9:30 AM |
Partisan | has entered the room |
Mark M. |
hello, Partisan
|
Partisan |
Hi mark
|
Mark M. |
Partisan: Micalet has already asked a question, so it is your turn -- do you have a question?
|
Partisan |
This is good timing! I just logged onto the site looking for some support and saw your office hours were on
|
Partisan |
Yes, but it's to do with a technical problem I'm getting with gradle and android studio
|
Mark M. |
OK, go ahead -- with luck, I can help
|
Jan 23 | 9:35 AM |
Partisan |
Thanks - I only started going through your tutorials yesterday, but whenever I try to run anything, even a simple hello world program, on android studio, I get an "Execution failed for task 'app:dexDebug' error in the cradle console
|
Mark M. |
can you post the entire error here? there should be some details after that line
|
Partisan |
Sure, one sec, I'm on my laptop
|
Micalet |
hello again Mark. It works perfect. That was what I need
|
Mark M. |
Micalet: glad to hear it!
|
Micalet |
Thank you again.
|
Partisan |
View paste
|
Micalet |
Bye
|
Mark M. |
Partisan: hmmmm... that was less informative than I had hoped... :-(
|
Mark M. |
if you create just a plain new project in Android Studio, does it run?
|
Partisan |
No, same issue - give that I'd only just started with your tutorial I deleted everything I could find to do with android studio, .gradle etc., completely reinstalled, made a hello world program using the New Project tool and it's still the same :/
|
Jan 23 | 9:40 AM |
Mark M. |
is there anything of interest below what you have pasted, such as a message regarding "the system cannot find the specified path" or anything?
|
Partisan |
No, after that it's just BUILD FAILED
|
Mark M. |
can you try copying that command and running it from a command prompt?
|
Partisan | |
Partisan |
Do you mean this one? X:\Android\Android-SDK\build-tools\21.1.2\dx.bat --dex --no-optimize --output
|
Jan 23 | 9:45 AM |
Mark M. |
it would be that, continuing on through all of the switches
|
Mark M. |
X:\Android\Android-SDK\build-tools\21.1.2\dx.bat --dex --no-optimize --output X:\Android\HelloWorldAndroid\app\build\intermediates\dex\debug --input-list=X:\Android\HelloWorldAndroid\app\build\intermediates\tmp\dex\debug\inputList.txt
|
Partisan |
Error occurred during initialisation of VM. Could not reserved enough space for 048576KB Object heap
|
Mark M. |
now that's interesting
|
Partisan |
1048576KB**
|
Mark M. |
that's even more interesting, as that's 1TB, and I rather doubt that you have 1TB of RAM :-)
|
Partisan |
Ha ^_^
|
Mark M. | |
Mark M. |
that seems like the closest match to your problem
|
Mark M. |
if you go into your SDK Manager, what version of "Android SDK Tools" do you have installed?
|
Jan 23 | 9:50 AM |
Micalet | has left the room |
Partisan |
Good stuff. I had a search through Stack Overflow, and no-one had the exact issue, especially not from a fresh install
|
Partisan |
24.0.2
|
Mark M. |
hmmm, in theory, you should already have the fix, per Xav's comment towards the bottom
|
Mark M. |
though there's still people encountering the issue, per the last comment
|
Partisan |
Android SDK Tools: 24.0.2 SDK Platform-Tools: 21 and Build-Tools: 21.1.2
|
Mark M. |
you might double-check in the projects that you are trying and confirm that buildToolsVersion is set to 21.1.2
|
Mark M. |
in a classic Android Studio project, that would be in app/build.gradle
|
Mark M. |
in most of my samples, where I do not have an app/ module to maintain Eclipse compatibility, it would be in the build.gradle in the project root directory
|
Partisan |
Yea, buildToolsVersion "21.1.2" in build.gradle (Module: app)
|
Mark M. |
you might also manually examine the find_java.bat file cited in comment #16 of that issue, to confirm that you indeed have the fixed version
|
Partisan |
What's very strange about this is that yesterday morning, when I first started on your tutorials, it actually ran ok. I only got these issues yesterday evening :/
|
Mark M. |
I have no explanation for that either
|
Mark M. |
you may want to keep an eye on the main issue, into which the one I linked to was merged: https://code.google.com/p/android/issues/detail...
|
Mark M. |
beyond that, I don't have any great ideas
|
Mark M. |
other than to move to Linux :-)
|
Jan 23 | 9:55 AM |
Partisan |
I may actually give your last point a go
|
Mark M. |
we have penguins here. everybody loves penguins. :-)
|
Mark M. |
any last questions?
|
Partisan |
Ah, that's a shame. The line quoted in that answer was actually written differently, but even once amended it hasn't solved the problem
|
Mark M. |
then something else is afoot
|
Jan 23 | 10:00 AM |
Partisan |
No, I think I'm just going to try installing Studio on my Linux partition, hopefully that means I can get back to the good stuff
|
Mark M. |
you could post your own issue, mentioning the relationship to the other ones, and supplying the sort of stuff you posted here, including the results of the manual command run
|
Mark M. |
OK
|
Mark M. |
that's a wrap for today's chat
|
Mark M. |
the transcript will be posted to http://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is Tuesday at 7:30pm US Eastern
|
Mark M. |
have a pleasant day!
|
Partisan |
You took!
|
Partisan |
Too*
|
Partisan | has left the room |
Mark M. | turned off guest access |