I am not sure what I am doing wrong. The following code I use in an on click listener for a button and it works great in API8, now that I am checking compatibility its crashing everywhere else. What am I doing wrong?
startActivity(getPackageManager().getLaunchIntentForPackage("com.google.android.apps.maps"));
I figured out the issue. The emulator used with the AVD manager must be the google API version not the android version. The latter does not have the maps app installed.
Related
new freelancer dev here.
I've been developing an Android App with Android Studio as apart of some freelance work I've been doing. I do all my testing and debugging on a virtual emulator of an android device while my client reviews the app on his tablet after the testing is done. With this latest version, everything worked perfectly on my emulator, but the app won't even start on my client's tablet. He tried testing the app on a different tablet and while the app runs, it doesn't function properly (Such as buttons not running different methods, crashing after specific inputs, etc.). We are both very confused at what is going on and don't know how to begin tackling this problem. Previous versions of the app work, but they do not have all the required functionality. Nothing major a lot was added or changed from the last version and this most current version. The app has worked on a variety of different emulator settings as well.
I am using the Android Studio built in emulator tools for testing and using Android Studio as my IDE. My app is written in full java while using XML for the layouts of the different pages of the app.
I'm not looking for any immediate fixes/solutions, but more of a general direction to go, because I don't even know how to start fixing this issue.
Also, I'd like to reiterate, previous versions of the app have worked perfectly fine, and all versions of the app work fine on my emulator. The most recent version only fails to start/run properly when run on my client's tablet(s).
I've tried matching my emulator to my client's tablet as closely as possible to try to recreate any potential issues, but I haven't been able to get any of the errors or bugs to appear during debugging. Since we're pretty far apart, I haven't been able to have access to either of the two tablets that he has tried running the app on. My client formatted the original tablet that he was using to test the app but is still having the same issue of the app not starting.
I just deployed my app on the play store. It crashed when users downloaded it and does not open. Here are screenshots from Google's crash report. I don't understand the errors. Please help. Screenshot1 and Screenshot2
This means that you are dependent on a class which has changed since you compiled last. Per the Android documentation here.
You probably need to double-check what you are targeting when building and what versions your users have on their device. I hope that helps.
I have an extremely strange problem to which finding solution seems to be very tricky. Here's the story:
The application I'm working on uses both Facebook SDK and Google Maps v2. Team mate was working on Google Maps and I was working on Facebook part. When we combine his and mine code it appears that just having FacebookSDK as an imported project in the workspace (not even referenced in Properties|Android|Library section of our app) , straight away makes the app not see the Google Maps library. The work around is to add Google Maps into Java build path, however the application still crashes when we try to access the activity based on Google Maps. Not having Facebook SDK in the workspace makes the Google Maps work. When the app is ran with Google Maps added to the Java build Path, when trying to access the Google Maps activity LogCat shows NoClassDefFoundError exception.
Hope I explained the problem well. If not then let me know what more is required to get closer to fixing this strange problem. Thanks :)
SOLUTION: It seems that adding Java Build Path reference to android_sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs\google_play_services.jar file fixed the issue. Crysis averted. ;)
This question might be silly...but still:
I would like to learn the Android SDK, now I dont have an Android based phone,Can I still develop for it even if I dont own an android phone?
thanks
Yes. The Android SDK comes with an emulator, so you can run your apps on that.
Get Eclipse and Download the Android SDK through eclipse. This will allow you to debug your apps on the emulator right from your IDE. Also allows for Android App projects and code highlighting.
Yes. There is an (essentially) fully functional emulator.
I'm trying to write some apps using wikitude, and I'm having some problems running even the example.
I've put the sample ( BasicOpenARDemo ) that comes with the SDK inside eclipse and tried to run it, where I encountered the next error: "wikitude was not found on the system. Please press the ok-button to access the Android market and download wikitude."
First question- I don't understand- Why am I approached to download the utility when I have a standalone sample inside my eclipse? Doesn't the core files behind Wikitude come with the SDK or the sample itself?
The next question will be - after some googling, I've found that in order to install this "Android market" I need to follow the manual that comes in the 9th message in the next thread (the message that was written by ronni.rasmussen) -
http://forum.xda-developers.com/archive/index.php/t-529170.html
Well, I've followed it, and now when I try to press the OK button that comes after the "wikitude was not found on the system..." message, I get redirected to the Android market, where I find Wikitude, but when I try to download it- I get a "Download was unsuccessful. Please try again" error message. How do I fix that?
One more thing that I don't understand- How come it's written in this offline Android market that the available wikitude version is for android 1.5 and no longer maintained?
As you can see- I'm quite baffled here. Hope someone could clear this up for me.
I was with the exact same problem. The problem was that installing Wikitude from the market (following the link you provided) does not guarantee to have the system requirements supported in the virtual device, therefore it gives an error when you run the BasicOpenARDemo, if it let you install it at all.
The solution was creating an AVD with an GoogleAPI (it includes maps support, I used the level 10 API for Android 2.3.3, it didn't work for the level 8 API), adding the camera, accelerometer, compass, GPS, etc., support to the virtual device (I did this via Eclipse). Then I downloaded the .apk for Wikitude and installed it via command line (.adb).