android,android-fragments,google-play-services,supportmapfragmentRelated issues-Collection of common programming errors
David Dimalanta
android libgdx memory-efficiency debugging screen
When making my simple app for revisions to update the latest changes, I test it first between the device (Google Nexus 7) and desktop using Eclipse IDE. I made eleven screens for the game in terms of the following for testing:Splash screen (usually the company’s logo) Game content (Usually announced if it’s rated E or M, for example) Loading Screen Title screen Main Menu screen Player 1’s registration screen Player 2’s registration screen Player list screen Game screenI tried testing switching s
Jonathan Hobbs
java android animation sprites pixel
I have been coding speed for an object. I have made it so the object will move from one end of the screen to another at a speed depending on the screen size, at the monemt I have made it so it will take one second to pass the screen. So i have worked out the speed in code but when I go to assign the speed it tells me to force close and i do not understand why. Here is the code: MainGame Code:@Override protected void onDraw(Canvas canvas) {setBlockSpeed(getWidth()); }private int blockSpeed;privat
milano
android libgdx
I try to create live wallpaper with libgdx framework. Here’s my source code: repositoryWhen I run this, black screen with name of the app appears (probably empty android layout). Main game is not called. I think that it is because starting a service not an activity. However how could I start an activity when AndroidTestWallpaper isn’t subclass of Activity class? I used this tutorial but I don’t think it’s complete, in this form my IDE (Intellij IDEA) doesn’t let me to run the app because no main
A M
android cocos2d
CCScene doesn’t show anything on 4.3 version?I am working on a project in which I’m using the cocos2d_android.jar and on the 4.3 version the screen goes blank and music/ccTouches/others things working fine.Even after I change the jar file with the API level 18(4.3 version), Add into my project and there is no error in the import time and uses their classes but in the RunTimeError occurred like :09-14 07:49:49.890: E/AndroidRuntime(1282): FATAL EXCEPTION: GLThread 102 09-14 07:49:49.890: E/Andro
grgarside
android mac-os irrlicht ndk
I’m new to irrlicht and I have started with irrlicht android port. I have made the following changes to android.mk file:LOCAL_CFLAGS := -O3 -DANDROID_NDK -DDISABLE_IMPORTGL -I./../include/ -I./include/ -I/documents/karthik/android/android-ndk-r9/platforms/android-18/arch-arm/usr/includeLOCAL_LDLIBS := -L/documents/karthik/android/android-ndk-r9/platforms/android-14/arch-arm/usr/lib/libGLESv1_CM.so -ldl -llog -L/documents/karthik/android/android-ndk-r9/platforms/android-14/arch-arm/usr/lib/libGLE
rolfl
java android parcelable
I am new to the Parcelable interface that I have implemented in my classes. At first they were Serializable, but now I have changed them to Parcelable.Have I done this the right way, and am I doing everything correctly? Here are my snippets of code:Citypublic class City implements Parcelable {private String code;private String name;private List<CityWeather> weathers ;public City() {super();}public String getName() {return name;}public void setName(String name) {this.name = name;}public Str
Mark101
java android
I have a method called hash button however on press the application crashes. Any idea why this is happening?I have included parts of my logcat below, any help is greatly appreciated.Many Thanks, Mark02-12 16:59:26.115: E/AndroidRuntime(2416): FATAL EXCEPTION: main 02-12 16:59:26.115: E/AndroidRuntime(2416): java.lang.ArrayIndexOutOfBoundsException: length=4; index=4
user3313192
java android json android-asynctask
I’am building a app that connects to a remote sever through JSON in this case connecting to ‘localhost’. The current program i have written will open different UI depending on their ‘type’ i.e normal or admin. My logat and java are below: This is my Log cat data: 02-19 07:19:51.921: E/AndroidRuntime(1707): FATAL EXCEPTION: AsyncTask #1 02-19 07:19:51.921: E/AndroidRuntime(1707): Process: com.example.newjudoapp, PID: 1707 02-19 07:19:51.921: E/AndroidRuntime(1707): java.lang.RuntimeException: A
user2005938
java android box2d andengine sigsegv
I am getting this error:Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 16513 (UpdateThread)when I create the body of a wall, but only the second time the method is called. For example, when the scene loads, the method that loads these walls is called once, and when the player collides with an object that brings him to the next room, the method is called again. This is the part of the method that is giving this error:Tile t = new Tile((float) i * 64, (float) j * 64- ((j * 64 – (mHeight
baTimá
android android-intent android-activity android-logcat
When i try to open a activity in my app which its suposed to show some saved messages(that i saved in another activity in the same app) it Force to Close and shows me these errors in LogCat:10-08 18:22:17.243: E/AndroidRuntime(269): FATAL EXCEPTION: main10-08 18:22:17.243: E/AndroidRuntime(269): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mensagem/com.example.mensagem.Mensagenssalvas}: java.lang.NullPointerException10-08 18:22:17.243: E/AndroidRuntime(269):
Eddie
java android android-fragments tabs
I have an Activity, which has 2 text fields and a button; when the button is clicked the text in the text fields are uploaded to sql remote server.it works fine.Now i want to create a swipe/tab view. i have done that,and till this it is fine. Now i want the above activity to be shown under this swipe view,in one of the tab. The GUI is fine . but when i click the button to upload, it shows the error.following is the code,which works when it is a separate activity: AddComment.javapackage overskov.
user1745263
android android-fragments android-gallery android-inflate
new here, been a long time prowler.I am trying to set up a gallery for my app. I am implementing the one from the AOSP “Launcher2” here which is working wonderfully on android 4.0But.. on my other test device (2.3.4) I get an “android.view.InflateException: Binary XML file line #24: Errorinflating class fragment”I checked this stackoverflow solution here where he seems to have it working for all versions. So I implemented his changes into my WallpaperChooser.javapackage gallery.android.demo;impo
sami
android android-fragments fragment android-fragmentactivity
when i click btnMeat only a black page displays. i want to display fragment pages. i am really confused.my main page:public class Main extends Activity {public void onCreate(Bundle bundle) {super.onCreate(bundle);setContentView(R.layout.main);Button btnMeat=(Button)findViewById(R.id.meat);btnMeat.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {try {Intent intent=new Intent(Main.this,MeatList.class);startActivity(intent);}catch (Exception ex){Toast.makeText
Mike
android listview android-fragments interface
I have an interesting fragment with multiple spinners. THe first spinner, loads the data into the second spinner based on what was selected. It looks something like this:When the fragment first loads the first spinner is “All” and it fills the listView with all the beers. Right now this is the only listView I can click on items without them force closing. The code for my portfolio is:public class Portfolio extends Fragment implements PortfolioGetAllBeers.OnArticleSelectedListener {String beerId
user2977501
java android android-fragments
Hello I’m working on an application that is going to be android launcher there are three different screens in this launcher the first screen is a bookshelf that is supposed to import and Show all books in the SD card place on the device the second is a calculator (works just fine!) Third is a Homework page where you can make google drive docs and flashcards (also works fine!!) I get no errors when I run my code the app automatically crashes when it launches on my device and on the emulator.Here
Peter Blum
android android-fragments nullpointerexception initialization
I have tried to debug this issue, but am quite puzzled to why I am getting a Null Pointer Exception error. I keep getting the error at the line in my code where the checkBTStates() method is declared (yes I have gone through this to the best of my ability to make sure everything is okay) Below is my fragment, activity, and error code. I wish I could paste code better. Sorry.Fragmentpackage edu.umass.ecs.chalkmaster3000;import android.app.Activity; import android.app.Fragment; import android.blue
Ryan
android android-fragments android-viewpager android-tabs
I’m trying to implement FragmentTabPager Activity, but it doesn’t run at all. Once I call the activity the app stops immediately. I’ve used tried multiple sources of code/tutorial including developers.android, but the same problem happens with all of them. And from what I understand, no one has faced the same problem(at least they haven’t written about it). THis leads me to believe that I am making some stupid mistake. I’ve spent over 2 days on this. Heres the code for my fragmentTabPager activi
Bryan
android android-listview android-fragments
Ok I have an app that implements tabs in the action bar using fragments. each of those tabs have their own views with buttons in them each. I want to be able to launch either an activity or another fragment view from those buttons to do various other things. An example of what i’m trying to do would be as follows. I have my main activity which looks like this:public class MainActivity extends SherlockFragmentActivity {@Override protected void onCreate(Bundle savedInstanceState) {super.onCreat
Raphael Miedl
android exception pointers android-fragments null
from parent classBundle bundle=new Bundle();bundle.putStringArray(“img_array”, array);for(int i=0;i<array.length;i++){System.out.println(“this is from arrayy….”+array[i]);//this gives me value} fragment = new Frag2 ();fragment.setArguments(bundle);this is target class public class Frag2 extends Fragment {public View onCreateView(LayoutInflater inflater,ViewGroup containerObject,Bundle savedInstanceState){//here is your argumentsBundle bundle=getArguments(); //here is your list array String[
virtualpathum
android android-fragments android-asynctask
I have an async task that loads a list view of items. I am currently trying to set the onClick to load a new fragment with an “id” that is being retrieved from the list item that is clicked. I have no errors in my code that the Android Studio shows me.When I run the app and click on the item in the list view I get this FC:02-13 19:49:56.813 20334-20334/com.beerportfolio.beerportfoliopro E/AndroidRuntime? FATAL EXCEPTION: mainjava.lang.NullPointerExceptionat com.beerportfolio.beerportfoliopro.Re
cavpollo
android google-play google-play-services google-play-games
Im having trouble with Google’s Play Services Log In. I have a Samsung S3 and the application runs jsut fine. I can login, unlock achievementens, post highscores, etc.But I have been testing on some other devices, like the Samsung Galaxy Ace. For that device, when I try to log in for the first time it prompts me for an account (like it would normally do). After selecting it and proceeding, it says com.google.android.gms has crashed. There is no other option other than closing it forcefully and t
user1406716
android location google-play-services
Cannot get the straight copied Google’s Training Example of LocationUpdates to work. The NullPointerException is as below.Code is same as Google’s: http://developer.android.com/training/location/retrieve-current.html12-18 00:23:41.776 21601-21601/com.neil.practice E/AndroidRuntime? FATAL EXCEPTION: main java.lang.NullPointerExceptionat com.neil.practice.google.geo.MainActivity.onConnected(MainActivity.java:366)at com.google.android.gms.internal.p.k(Unknown Source)at com.google.android.gms.inter
allyjweir
java android google-maps google-play-services
Having real difficulty finding my error in this code. Been stuck on it for an embarrassingly long time. Any help finding the issue would be a great help.Here is the class that is throwing the errorpackage ggow.teamt.mdrs;import com.google.android.gms.common.ConnectionResult;import com.google.android.gms.common.GooglePlayServicesClient;import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;import com.google.android.gms.common.GooglePlayServicesUtil;import com.google.and
enrmarc
android android-studio google-play-services
I have installed Google Play Services and created a Hello World app to test that everything is working fine and I think the application size is too big: 4.98 MB. I’m using Android Studio and I’ve followed the instructions detailed in the android developers web.This is my gradle file:apply plugin: ‘android’android {compileSdkVersion 19buildToolsVersion “19.0.1”defaultConfig {minSdkVersion 15targetSdkVersion 19versionCode 1versionName “1.0”}buildTypes {release {runProguard falseproguardFiles getD
Howlin
android google-play-services google-play-games
I have checked a few different questions already like thisI am trying to implement a Google sign in and have been referring to https://developers.google.com/games/services/training/signin/ but cannot figure out how to resolve this errorI currently have the following meta data in my Manifest file<meta-data android:name=”com.google.android.gms.games.APP_ID”android:value=”@string/app_id” /><meta-data android:name=”com.google.android.gms.version”android:value=”@integer/google_play_services_
Cropper
android google-plus google-play-services
My Application Want to share Image on Google Plus And I have read About Google Plus And API shows that we can post media File using PlusShare.Builder. And I have Also Searched In stackoverflow but ditn’t Get any Proper Answer. And I have Tried with These Code is :case R.id.Share:if (mPlusClient.isConnected()) {Intent shareIntent = new PlusShare.Builder(this,mPlusClient).setType(“image/*”).setText(“Risk Score”).addStream(Uri.fromFile(new File(Path))).getIntent();startActivityForResult(shareIntent
Martín Marconcini
android intellij-idea actionbarsherlock google-play-services
I’d like to import (and use) the Google Play Services library into an existing Android project, but I am struggling with what must be a dependency problem. All documentation written by google is based upon Eclipse. We use IntelliJ IDEA. Things I know: I know how to import Modules, Libraries, add Dependencies, etc. in IntelliJ. I also know that according to the getting started guide at Google, you have to add the google-play-services-lib into (Eclipse) as a project (by importing existing code in
Jino
java android google-play-services
I am tryin to run fuse location sample application downloaded from google itself but after downloading Google play sdk in eclipse and setting a jar file inside fuse location app . I am getting following error.Even after adding into java build path why its not able to find a class ?03-13 14:28:59.961: I/dalvikvm(3704): Failed resolving Lcom/kpbird/fusedlocation/MainActivity; interface 548 ‘Lcom/google/android/gms/common/GooglePlayServicesClient$ConnectionCallbacks;’ 03-13 14:28:59.961: W/dalvikvm
alex
android gradle google-play-services robolectric
I have a project that uses google play services, maps in particular. The project is working fine. The dependency in build.gradle uses the google repository and in declared like thiscompile ‘com.google.android.gms:play-services:3.2.25’I wanted to use the gradle-android-test-plugin, so I configured it, added the test runner, created a simple test with only assertTrue(true) and run it with ./gradlew testThe test fails with a java.lang.NoClassDefFoundError: com/google/android/gms/maps/model/LatLng a
Tunarock
android google-plus google-play-services
I have a problem with eclipse. In my layout when I try to put a PlusOneButton eclipse says:The following classes could not be instantiated:com.google.android.gms.plus.PlusOneButton (Open Class, Show Error Log)See the Error Log (Window > Show View) for more details.java.lang.NullPointerException at com.google.android.gms.plus.PlusOneDummyView$b.isValid(Unknown Source) at com.google.android.gms.plus.PlusOneDummyView.eN(Unknown Source) at com.google.android.gms.plus.PlusOneDummyView.<init>(Un
DanielVasic
android google-maps-android-api-2 supportmapfragment
I have a problem with running SupportMapFragment on Android (API 10) here is what I get from logcat:02-22 02:16:09.516 1132-1202/? E/ActivityManager? heap conf. property name string trimmed: hs.com.lge.android.calendar.wid 02-22 03:50:54.214 15767-15767/? E/ActivityThread? Service com.koushikdutta.rommanager.DownloadService has leaked IntentReceiver com.clockworkmod.billing.ClockworkModBillingClient$8@4054cb08 that was originally registered here. Are you missing a call to unregisterReceiver
Neil
monodroid mvvmcross supportmapfragment
The following code works fine in a single orientation but as soon as the orientation changes it causes an exception:using Android.App; using Android.Content.PM; using Android.Gms.Maps; using Android.Gms.Maps.Model; using Android.OS; using Android.Support.V4.App; using Cirrious.MvvmCross.Droid.Fragging; using System; using System.Collections.Generic; using System.Drawing;namespace Demo.Droid.Views {[Activity(Label = “View for MapViewModel”, Theme = “@android:style/Theme.NoTitleBar”, Configuration
hoss
android google-api android-studio supportmapfragment mapfragment
I have searched many hours and days to find the answer to this, but still cannot. I am using Android Studio (latest ver) IDEI am trying to create a map view (using Google Maps API) into a Fragment that is part of a FragmentActivity.AndroidManifest was updated with necessary permissions and Google Key.As you can see at the output, LatLng class from Google Map API is working well as I am creating an instance. Lib was imported on libs folder Please help !!EDIT: Found this instructions How to build
Michael
google-maps-android-api-2 supportmapfragment mapfragment
I am working with the Google maps API V2 and it is going fine. i have a 2.2.2 android device wich i use to debug my app.now i just got a Galaxy Note 2, and when i try to debug on that device the app imidiatly crashed “project has stopped working”.So i just made a small example to test with. and again it runs great on 2.2.2 but not on 4.1.1.this is the code i have for the small example exerciseAny suggestions would be much appreciatedMy Layout<RelativeLayout xmlns:android=”http://schemas.andro
aseem
android android-maps android-fragmentactivity android-maps-v2 supportmapfragment
Earlier i have made an application in which i have used Maps with Fragment. In XML layout file i have used “fragment” element (using SupportMapFragment) and used in my activity by using setContentView and have defined some marker. It works fine.Now this time i tried to make another activity and its corresponding XML layout in same application…I have just inflated XML layout…it gives error of force close.I have searched many time on internet but not get helped clearly. Please show me the way.
NirPes
android google-maps android-fragments google-maps-android-api-2 supportmapfragment
I managed to make it work, but when I switch the fragments the app crashes.another thing that I want, Is to make the fragment show exactly in the state the user left it.What I mean is that I don’t want to make a new instance of the fragment every single time the user clicks the button that switches to it.the FragmentActivity:import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.
Harsha M V
android android-fragments google-play-services supportmapfragment
public class PlaceMapsFragment extends SupportMapFragment {private GoogleMap mMap;@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {super.onCreate(savedInstanceState);View v = inflater.inflate(R.layout.fragment_place_maps, container,false);setUpMapIfNeeded();return v;}private void setUpMapIfNeeded() {if (mMap == null) {mMap = ((MapView) findViewById(R.id.map)).getMap();if (mMap != null) {setUpMap();}}}private void setUpMap() {mMap.addMarke
lyk
android android-maps-v2 supportmapfragment
I’m trying to implement Google Map display and below are my codes:package com.fragments;import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup;import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.SupportMapFragment;public class MapFragment extends SherlockMapFragment {private GoogleMap mMap;@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {View root
Harsha M V
android android-fragments android-maps supportmapfragment
I have a Fragment which Extends SupportMapFragment.public class PlaceMapsFragment extends SupportMapFragment {private GoogleMap mMap;private LatLng mPosFija;public PlaceMapsFragment() {super();}public static PlaceMapsFragment newInstance(LatLng posicion) {PlaceMapsFragment frag = new PlaceMapsFragment();frag.mPosFija = posicion;return frag;}@Overridepublic GoogleMap getMap() {// TODO Auto-generated method stubreturn super.getMap();}@Overridepublic void onCreate(Bundle arg0) {// TODO Auto-generat
Harsha M V
android android-support-library google-play-services mapfragment supportmapfragment
I am trying to use the new Google Play Services Lib and embbed Maps in side the Maps Fragment as belowPlaceMapsFragment.javapublic class PlaceMapsFragment extends SupportMapFragment {private GoogleMap mMap;private LatLng mPosFija;public PlaceMapsFragment() {super();}public static PlaceMapsFragment newInstance(LatLng posicion) {PlaceMapsFragment frag = new PlaceMapsFragment();frag.mPosFija = posicion;return frag;}@Overridepublic GoogleMap getMap() {// TODO Auto-generated method stubreturn super.g
Web site is in building