|
Anyone with IntelliJ experience here? I've got a project with three modules. An App module -A An android library module -B A regular java library module-C They all have a variety of dependencies modeled as a Project level library -D How do I get this poo poo to compile and run (scopes and exports)? I'm getting top level exceptions when compiling into a dex file. With some work, I can get it to compile but not run because its missing the runtime dependencies in D. I'm going crazy and would prefer to keep my dependencies explicit for each module. Any ideas?
|
# ? Apr 3, 2013 03:32 |
|
|
# ? May 13, 2024 11:26 |
|
Ethereal posted:Anyone with IntelliJ experience here? I ditched Eclipse for IntelliJ, it's really nice. How are you configuring the Project Structure section? You can use the Libraries section to reference regular jars, so it should have pretty much have everything from the libs folder. This combines all those libraries into a single reference. Under modules, the app module should have compile scope on the Library group and each of the Android library modules. The Android library module is mostly the same, it should reference module D if needed, and any jars thar are required for that library (ex: ActionBarSherlock references the support jar). If you get any duplicate definition errors, that's caused by having the same JAR referenced in two modules. Set the scope for that JAR to 'Provided' on everything but the first module that references it. Another gotcha that you may hit is that sometimes it'll fail to detect that an Android library project is a library, you can go to the Facets section and check the "Library module" box on that module.
|
# ? Apr 3, 2013 05:00 |
|
Salvador Dalvik posted:I ditched Eclipse for IntelliJ, it's really nice. So there is no libs folder which complicates things. We have a language agnostic dependency resolution system that has collated all of our dependencies D into a project library. A, the main app, has D as provided, B as compile, and C as provided. B, the android library, has D as provided, C as provided. It is a library module in the facets section. C, the java library, has D as provided. Somehow, D is not being packaged in at runtime, which makes sense given how everything is modeled. But if I set it to compile, it causes a top level exception when compiling the dex file. None of the modules are checked for export. I am getting a NoClassDefFoundError with Slf4j when running the app. I can get everything building and running just fine in eclipse. I'd rather kill myself than use eclipse though.
|
# ? Apr 3, 2013 06:24 |
|
Ethereal posted:So there is no libs folder which complicates things. We have a language agnostic dependency resolution system that has collated all of our dependencies D into a project library. Well, when you include D in the compile scope of A, it should work fine as long as there isn't any kind of overlap in class definitions. See what class is referenced in the top-level exception. Somehow you are including it twice. The most common cause is a second android-support-v4 sneaking in there, or v4 and v13 overlapping. In a traditional structure, you would have most of the libraries you need compiled in the main app. Then you can just set any overlapping references to provided and you are set. It sounds like you'll need to work backwards to find the overlap here. E: This kind of TOP-LEVEL-EXCEPTION is one of the things that the ant build system won't fix for you, unlike Eclipse. Eclipse kinda works around certain build issues, like mismatched JARs and duplicate class definitions. If you fix this for IntelliJ, you'll also be a lot closer to having a proper Ant build and setting up a Jenkins build server. zeekner fucked around with this message at 06:48 on Apr 3, 2013 |
# ? Apr 3, 2013 06:42 |
|
http://developer.android.com/about/dashboards/index.html So they've changed the way they count device versions. Before it was based on devices' automatic check-ins over a 2-week period, so basically every device out in the field. Now it's based on devices where the user actually opened the Play store. I can't tell if this is goalpost-moving or if this actually is a better metric. It does seem to more accurately reflect the user base of one of my apps, for whatever it's worth.
|
# ? Apr 3, 2013 15:25 |
|
kitten smoothie posted:http://developer.android.com/about/dashboards/index.html It doesn't reflect the actual Android world anymore since a lot of the old devices maybe get used to check gmail or as a phone but not to download and play Angry Bird 12. On the other hand it offers a better overview for developers since people that don't open the market at all (and thus don't have to be targeted anyway) don't appear in the graph. Since the site is for developers I think it's for the better though I guess they did it because it looks better on them.
|
# ? Apr 3, 2013 16:07 |
|
Has anyone tried getting ADB to work via Bluetooth? The only thing I've found related is this https://coderwall.com/p/pfuq4g that I'll try tomorrow . At work, I'm debugging this usb peripheral that goes on my S3 so I'm assuming I have to do something with ADB. Unfortunately, at my work my phone and laptop are on two different networks so I haven't had any luck with ADB wirelessly.
|
# ? Apr 4, 2013 01:34 |
|
Salvador Dalvik posted:Well, when you include D in the compile scope of A, it should work fine as long as there isn't any kind of overlap in class definitions. See what class is referenced in the top-level exception. Somehow you are including it twice. The most common cause is a second android-support-v4 sneaking in there, or v4 and v13 overlapping. I was able to figure it out. Our dependency resolution system plugin for intelliJ aggregated our runtime and test dependencies into one library which caused conflicts for certain 3rd party libraries. It looks like the eclipse variant is a bit more robust. Normally the dependency resolution is amazing for non-android work (mostly backed and front end web dev), but in this case it didn't work as well as it should have. Thanks for the input though, you helped me re-evaluate every part of the build process.
|
# ? Apr 4, 2013 07:51 |
|
Geno posted:Has anyone tried getting ADB to work via Bluetooth? The only thing I've found related is this https://coderwall.com/p/pfuq4g that I'll try tomorrow . I had a similar situation when I was doing some Android-based sensor networking stuff - phone and laptop were on different connections and USB was being used. I ended up just using a wifi hotspot on the phone and connected the laptop, using 3g for internet.
|
# ? Apr 4, 2013 16:15 |
|
Is it possible to scale a view in Android? If so, how? For those of you familiar with iOS, I'm asking about something similiar to self.layer.transform = [3d matrix], although just a 2D transform will be sufficient. I googled around, and a few people asked this question only to get "Did you try just setting the width/height?" which is NOT what I'm looking for.
|
# ? Apr 4, 2013 22:13 |
|
Small White Dragon posted:Is it possible to scale a view in Android? If so, how? That is strange advice, Android Views don't have width/height directly - those are calculated based on top/bottom/left/right. You could animate those values though. Could you use a ScaleAnimation? http://developer.android.com/reference/android/view/animation/ScaleAnimation.html Something like: code:
|
# ? Apr 5, 2013 20:15 |
|
Hey guys, I'm looking for a particular app that doesn't quite seem to exist so I thought I'd try to make it myself. I've got a good bit of C# experience but very very little with Java and mobile development. All I want it to do is this: pre:-Press button -Start recording a video -Maybe actually display the video as it records -Pres button -Stop recording video -Upload video file to an FTP, or possibly just email it as an attachment -Delete the local video
|
# ? Apr 10, 2013 18:34 |
|
Sab669 posted:Hey guys, I'm looking for a particular app that doesn't quite seem to exist so I thought I'd try to make it myself. I've got a good bit of C# experience but very very little with Java and mobile development. That sounds really simple to me. You might look into using Xamarin Studio (http://xamarin.com/studio) and just writing the app in C# if that's what you're familiar with. I haven't used it but from what I understand you don't need a license to create small applications (I don't know what the cutoff is exactly but it sounds like you would not come close to it).
|
# ? Apr 10, 2013 19:37 |
|
I've considered using Xamarin but figured I should probably brush up on my Java skills because I need a new loving job. I don't think Xamarin really makes it any easier to develop ultimately. And with the free license you can build apps and test them on a virtual device but you can't actually publish them I believe. I briefly used it to emulate a barcode reader for work but never got far with it Downloaded the JDK to start playing around, as someone who doesn't know anything about Android development it seemed pretty complicated to set up a simple button that starts recording video, let alone stopping then sending the file. Edit; Well, Looking around at Xamarin again they actually have a demo app that starts & stops the camera to record video. I'm trying to adapt it to email the file as an attachment which seems simple enough but the emulator keeps crashing so I can't very well test it. Even if it wasn't, what the hell would the camera do on a virtual device. Sab669 fucked around with this message at 21:47 on Apr 10, 2013 |
# ? Apr 10, 2013 19:42 |
|
Sab669 posted:I've considered using Xamarin but figured I should probably brush up on my Java skills because I need a new loving job. I don't think Xamarin really makes it any easier to develop ultimately. And with the free license you can build apps and test them on a virtual device but you can't actually publish them I believe. I briefly used it to emulate a barcode reader for work but never got far with it The old Xamarin suite (MonoTouch?) worked that way, but the new one (Xamarin Studio) does allow you to work on actual hardware (this I've seen) and from what I understand you can even publish apps under a certain size (32k of IL code according to http://xamarin.com/monoforandroid - doesn't sound like much but I think it would fit your use case). Doing it in Java isn't a bad idea, I just suggested Xamarin given your C# background. I don't think it would take too long to do what you're trying, if you get hung up feel free to post some code and ask for advice.
|
# ? Apr 10, 2013 22:00 |
|
Heh, well, I have absolutely no idea what I'm doing. I downloaded this sample and tried to mod it to fit my needs. I changed the main.xml layout to have only 1 button, and then the Video View to display the camera. It's ugly, but I'll be using it on the road so big rear end buttons are fine. By default the demo app supports taking different resolution photos or videos. So I stripped out all of the code in reference to taking photos and am left with just the video stuff. Then let's see...
It looks like that's the "end" of it. There's a lot of other code but nothing that seems directly relevant. So I guess within the "onActivityResult" method (what would be the proper term for this chunk of code? In C# Id say an event handler) is where I'd just make a call to my method that would attach this video to an email, and if I can automatically send it, do so. Creating an emailing and setting attachments is simple enough, I've looked that up already. I don't like this demo though, because it looks like when I hit the button it will simply launch the camera, then I'll need to hit Record within the camera... then stop recording within the camera to return back to this App at which point it would do the email. I think I'll just have to go out and sit down with my Android book at some time and really crack down on all the terminology and everything. I dicked around with Xamarin a little bit at work but didn't have much better luck, because at the end of it all I'm still unfamiliar with the Android framework either way. Though the familiar IDE is a big plus, because I loving hate Eclipse and Netbeans. Sab669 fucked around with this message at 05:31 on Apr 11, 2013 |
# ? Apr 11, 2013 05:18 |
|
Sab669 posted:Heh, well, I have absolutely no idea what I'm doing. I downloaded this sample and tried to mod it to fit my needs. That example is oriented for applications looking to quickly integrate a grab-video function, but it doesn't really record video like you want. You'll need to actually use the MediaRecorder class and follow this guide to get what you are really looking for. I haven't done any real work with video though, so I don't have much else to give here.
|
# ? Apr 11, 2013 05:41 |
|
Thanks I'm glad my suspicion of how it behaves was at least right! Off to a good start following their tutorial, I think. I don't want to go to work now! Sab669 fucked around with this message at 13:14 on Apr 11, 2013 |
# ? Apr 11, 2013 12:52 |
|
Why doesn't gUriMatcher.addURI("content://com.example.appname.provider", "detailsReading/#", DETAILS_READING) match content://com.example.appname.provider/detailsReading/83715? This is my first time messing with ContentProviders and URI's and so I'm sure I'm missing something obvious. Edit: I figured it out, I'm not supposed to put "content://" when I specify the AUTHORITY IAmKale fucked around with this message at 16:47 on Apr 18, 2013 |
# ? Apr 17, 2013 22:35 |
|
Is there really no other way to exclude older/slower devices from buying your app on the Play store aside from manually excluding hundreds of device models via checkboxes? My failed attempts to google an answer make me think I'm missing something really obvious.
|
# ? Apr 22, 2013 02:17 |
|
j4on posted:Is there really no other way to exclude older/slower devices from buying your app on the Play store aside from manually excluding hundreds of device models via checkboxes? My failed attempts to google an answer make me think I'm missing something really obvious. Does the Play Store not check an app's minimum SDK level and auto-exempt devices that are running an earlier version of Android?
|
# ? Apr 22, 2013 02:20 |
|
Karthe posted:Does the Play Store not check an app's minimum SDK level and auto-exempt devices that are running an earlier version of Android? It does. This is generally a good way of excluding older devices. I generally target 2.3+ now, and am really considering moving to 4.0+. You could check over the filters documentation for filtering on other things which might help: http://developer.android.com/google/play/filters.html
|
# ? Apr 22, 2013 02:33 |
|
Glimm posted:It does. This is generally a good way of excluding older devices. I generally target 2.3+ now, and am really considering moving to 4.0+. Appreciate the answers. It does, and I've set mine up to 4.0 just to cut down on incompatibility issues. I'm worried about older devices like the Samsung Tab 7.0 which can run android 4.0 but still crash when using my app. Likewise, I have a terrible knockoff samsung G3 from china that really has no business running 4.0 but somehow does anyway. The other manifest filters all deal with device capabilities like GPS, microphones, etc. The official answer is probably that our app should support all these devices--and it probably should--but.. well, you know.
|
# ? Apr 22, 2013 02:48 |
|
What kind of issues are you guys running into that is forcing you to set minimum at 4.0? I just recently jumped up to 2.2, for push and other features. I've mostly had to contend with phone-specific bugs or Cyanogen/ROM-introduced issues, but otherwise I haven't had that much trouble maintaining backwards compatibility.
|
# ? Apr 22, 2013 03:34 |
|
Salvador Dalvik posted:What kind of issues are you guys running into that is forcing you to set minimum at 4.0? I just recently jumped up to 2.2, for push and other features. It's actually an adobe air executable (sorry!), so it's compatible to 2.3. But it's a pretty heavy app and it runs slow/crashes in older devices that we've tested. This is a cross-release of an iOS app (sorry!) so we're mainly concerned with making sure that everyone gets a smooth user experience over wide availability. We're just setting it to 4.0 to try to screen out some older devices.
|
# ? Apr 22, 2013 04:39 |
|
j4on posted:This is a cross-release of an iOS app (sorry!) This is pretty much my entire project roadmap for the next year, so nothing to be sorry about. Does adobe air actually work worth a drat? Last time I heard someone use it to port an app over, it ended up a giant mess.
|
# ? Apr 22, 2013 05:16 |
|
Salvador Dalvik posted:This is pretty much my entire project roadmap for the next year, so nothing to be sorry about. It's perfect for what I need, because I'm working very closely with a non-technically minded animator who is used to working in flash. So I can treat his animations as native objects as opposed to dealing with sprite sheets and so forth. I've actually had relatively few problems with it, though the performance hit is noticable (I really should be blitting) and hard to diagnose. And porting to multiple platforms was quite easy (including to the web if we wanted to do that). I'm confident that if we didn't use flash it would have taken us twice as long to do the project. The big downside is that there's very little documentation or community. Some stuff is non-intuitive and frustrating. You're also cut off from a lot of nice native / 3rd party libraries and the built-in gesture implementation isn't very good. Ah, and bundling assets is strange; I might be doing it wrong. General feel: everything that is something you'd be happy doing in Flash on a website is easy and nice. 2D graphics are super easy. Everything that is tablet/OS specific is awkward and bolted on.
|
# ? Apr 22, 2013 07:17 |
|
edit: I'm an idiot
Glimm fucked around with this message at 00:21 on Apr 24, 2013 |
# ? Apr 24, 2013 00:10 |
|
Glimm posted:edit: I'm an idiot Huh? I saw the response before you deleted it, it was perfectly normal? I really look forward to the day we can completely forget about 2.x.
|
# ? Apr 24, 2013 00:25 |
|
Salvador Dalvik posted:Huh? I saw the response before you deleted it, it was perfectly normal? After I wrote it I re-read the posts and figured you were asking j4on directly. My spergtastic nature required removal of my post. I'm excited to leave 2.x behind. Thankfully for most of our apps installs on 2.x are down to about 35%. Yay for progress! I always feel bad for the Android folks (I mostly do iOS dev at work) when I get to bump up my minimum SDK for cool feature X (ARC and weak references hallelujah) and they have to just deal with it. Like you said though backwards compatibility isn't terribly difficult to maintain in Android, still a bit of a pain though.
|
# ? Apr 24, 2013 00:40 |
|
I wonder if anyone here can offer some general advice. I'm not particularly new to programming in general, but I'm fairly new to Android and basically virginal when it comes to game development. I'm mostly able to get through tutorials and understand generally what's going on programmatically, but my lack of understanding concerning graphical terminology is making me uncomfortable as I feel like I'm just repeating what I'm reading without understanding what I'm actually doing. For the sake of example, take this example code which implements a TMX tiled map. https://code.google.com/p/andengineexamples/source/browse/src/org/anddev/andengine/examples/TMXTiledMapExample.java I'm able to read through that and understand what it's doing, but then I see lines like this: code:
Basically I'm wondering if anyone knows of any books, tutorials, web sites etc that cover this kind of topic - graphics in games - at a reasonably abstract, language agnostic level?
|
# ? Apr 24, 2013 12:25 |
|
Gnack posted:Basically I'm wondering if anyone knows of any books, tutorials, web sites etc that cover this kind of topic - graphics in games - at a reasonably abstract, language agnostic level? http://forums.somethingawful.com/showthread.php?threadid=2692947
|
# ? Apr 24, 2013 16:57 |
|
Why the hell is Eclipse now bitching that R can't be resolved? I renamed my application package in AndroidManifest.xml, updated all of my class package names by hand, and cleaned the project, and now Eclipse can't resolve R in two classes...all of my other classes seemed to have figured things out, so why the hell aren't these two other classes getting along? I've even created a whole new Android project and took to recreating the files individually, but Eclipse still wants me to add import my.application.R to the top of these classes. I've commonly experienced this issue when I make a mistake in a layout XML file, but literally nothing changed during the rename except for the package name in the manifest and at the top of my class files. Is Eclipse really this lovely? IAmKale fucked around with this message at 21:51 on Apr 24, 2013 |
# ? Apr 24, 2013 21:48 |
|
Karthe posted:Why the hell is Eclipse now bitching that R can't be resolved? I renamed my application package in AndroidManifest.xml, updated all of my class package names by hand, and cleaned the project, and now Eclipse can't resolve R in two classes...all of my other classes seemed to have figured things out, so why the hell aren't these two other classes getting along? I've even created a whole new Android project and took to recreating the files individually, but Eclipse still wants me to add import my.application.R to the top of these classes. Especially with Android, it seems like poo poo gets real weird with automagic renaming of stuff via Eclipse. I quit using the convenience "New Android Layout/Activity/Fragment" bullshit after having my manifest file get thoroughly hosed by it more than once. I'm not terribly surprised it didn't catch a few import statement changes. I spent 30 minutes trying to figure out an R file issue one time, only to realize I had ctrl+shift+O'd and somehow Eclipse decided to import android.R instead of my own R file.
|
# ? Apr 24, 2013 22:09 |
|
jkyuusai posted:Especially with Android, it seems like poo poo gets real weird with automagic renaming of stuff via Eclipse. I quit using the convenience "New Android Layout/Activity/Fragment" bullshit after having my manifest file get thoroughly hosed by it more than once. I'm not terribly surprised it didn't catch a few import statement changes. I spent 30 minutes trying to figure out an R file issue one time, only to realize I had ctrl+shift+O'd and somehow Eclipse decided to import android.R instead of my own R file. Is IntelliJ more reliable for Android development? It seems to have good Android support, but I haven't had a chance to install and play around with it. I've just been using Eclipse because that's what comes with the ADK.
|
# ? Apr 24, 2013 22:14 |
|
Karthe posted:Thanks to version control I discovered that the problem was entirely due to PEBKAC. The two class files are in com.example.helpers, and I didn't realize that I was already importing my app's R in them before I updated the package name. I love IntelliJ, it's pretty nice and handles almost everything I need. The only issue I ran into is that their logcat does not filter by app package, so I use the monitor from the SDK. e: Just to give an idea of how well it's integrated, it'll detect if the activity isn't being referenced in the manifest and do the unused highlight on the class name.
|
# ? Apr 24, 2013 22:52 |
|
Somewhat cringe inducing but otherwise informative video from Google on the in-app purchase API: https://www.youtube.com/watch?v=rnsgAvFUEUo
|
# ? Apr 25, 2013 23:18 |
|
Does anyone here use Python for writing Android apps? Is it relatively easy to design simple apps or is this just for something specialized?
|
# ? Apr 29, 2013 05:00 |
|
What component does the Play app use to allow for left-to-right swiping between categories? I want to implement something similar but I'm not sure what I should be looking for. I thought it was a spinner, but I found out that's just Android's drop-down list. Is it an alternate form of the action bar's navigation tabs?
|
# ? Apr 29, 2013 14:43 |
|
|
# ? May 13, 2024 11:26 |
|
Karthe posted:What component does the Play app use to allow for left-to-right swiping between categories? I want to implement something similar but I'm not sure what I should be looking for. I thought it was a spinner, but I found out that's just Android's drop-down list. Is it an alternate form of the action bar's navigation tabs? You're looking for the ViewPager, which is in the support library: http://developer.android.com/reference/android/support/v4/view/ViewPager.html The new Play store uses its own implementations of some things the ViewPager gives by default, you can read about it here: https://plus.google.com/108761828584265913206/posts/Cwk7joBV3AC Looks like someone made an implementation based on the above post already that should be pretty much drop in: https://github.com/astuetz/PagerSlidingTabStrip
|
# ? Apr 29, 2013 16:49 |