android,google-maps,android-fragments,android-viewpager,fragmentRelated 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):
Student
java android google-maps
I am working on a project that includes location detection using the GPS so I found this code that included a working .apk file but when I tried to compile it and run it, it always crashes. The application crashes when I try opening it in an emulator or on a Samsung S4 mobile. N.B. I’ve chosen the correct target which is API 17 and downloaded Google play services and included it in the library of the project.Here is the code if anyone can helpManifest file<?xml version=”1.0″ encoding=”utf-8″
Student
java android xml eclipse google-maps
I am developing a Google map v2 Android application. It is crashing and not opening at all. I followed the tutorial by Google developers and got an API key that I used in the Manifest fileMainActivity.javapackage com.example.maps;import android.app.Activity; import android.os.Bundle;public class MainActivity extends Activity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);} }activity_main.xml<?xml version=
Stilly.stack
java android google-maps mapactivity
I’m working with googlemaps v2, firstly I get error “Couldn’t get connection factory client” Android MapActivity googlemaps : Couldnt get connection factory client. And I try to fix it from some tutorial and now get error “FATAL EXCEPTION: main java.lang.NoClassDefFoundError”.Logcat error12-18 09:48:40.670: V/SQLITE(330): Check DB on /data/data/com.mtower.adha/databases/mtowerdb.sqlite 12-18 09:48:40.790: I/coba(330): async start 12-18 09:48:41.470: D/dalvikvm(330): GC_FOR_MALLOC freed 2156 obje
shylendra
android google-maps android-emulator
I already generated API key by giving the MD5 fingureprint from here https://code.google.com/apis/console/?noredirect#project:413913157166:accessbut after running the android application i got error message Unfortunately,(ProjectName) has been stopped Android in the emulator Need Help.. Thanks in advancehere is my logcatt. Please make sure your kernel is compiled with file capabilities support enabled. 12-23 01:06:40.713: W/dalvikvm(1663): PR_CAPBSET_DROP 33 failed: Invalid argument. Please mak
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
Jack
android google-maps android-maps android-maps-v2
I keep getting a NullPointerException in my application for the GoogleMap object defined in the line:mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();I have map defined in my xml file like so:<fragmentandroid:id=”@+id/map” android:layout_width=”match_parent” android:layout_height=”match_parent” class=”com.google.android.gms.maps.SupportMapFragment”/>I also have all of the appropriate permissions as well as the API in my AndroidManifest.xml.Here is my entire
Flybywind
android google-maps
all:I’m a new starter of android. Now I’m going to run an Android Maps V2 project. I followed step by step as described in https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw, failed and tried many times, but i continually encounter the following :02-03 01:48:48.783: E/AndroidRuntime(11547): FATAL EXCEPTION: main 02-03 01:48:48.783: E/AndroidRuntime(11547): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.googlemapdemo/com.example.go
Android-converter
android google-maps google-maps-markers android-maps-extensions
Ok so I’ve searched and searched, I’m on the final hurdle of getting this example project working, but now it keeps failing to launch on my phone (Galaxy S4) when I try to implement android-maps-extensions 2.0 (I have loads to markers to add to the map, but need them dynamically)I have the libraries all setup and working as they should, but whenever I change my MapFragment codes to SupportMapFragment the app crashes and doesn’t open. If I leave everything as is the app loads on my phone fineLogC
brtancs
android google-maps
model : zt180 firmware : android 2.1-update1-20101030 kernel : 2.6.32.9 usbandroid #1608 build number zt180-eng 2.1-update1 20101030 google maps : 4.5.1Various crashes occur when embedding the google maps component into an android application. I’m connecting to a router via wi-fi for internet access. The stand-alone google maps app seems to work fine. To re-produce, start the maps app and begin scrolling around. Will fail within a couple of minutes, occassionally on start-up (in setContentView).
Graham Borland
java android xml google-maps android-mapview
There are 3 buttons on the screen! Start, View Map, StopWhen I click View Map, it should go to a new screen that shows the map! But something goes wrong and the app is getting force closed! I keep getting Could not find class A referenced from method B error. Please please please someone correct it. I’ve been struck with this for 3 days!!! :'(Main.xml<?xml version=”1.0″ encoding=”utf-8″?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”android:orientation=”vertica
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
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
TJ Biddle
android dalvik actionbarsherlock android-viewpager
When using ActionBarSherlock and ViewPagerIndicator at the same time I am getting the below error; from what I’ve read – it’s caused due to conflicting/duplicate libraries in the two. One solution was to have ABS rely on VPI (Or the other way around, I tried both) but this still gave me the same error even after a clean and rebuild. Right now I’m just working in two separate projects so I can get my work done – but I’d like to combine them obviously ha. Help would be much appreciated![2012-04-19
elimence
android android-viewpager android-annotations
I created a simple android project in Android Studio using navigation type Tabs + Viewpager. The code compiles and runs OK. But after i included android annotations, i get a null pointer exception for the viewPager object.The Code is as follows:MainActivity.java;package com.example.tabnanot;import java.util.Locale;import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import
thepoosh
android android-viewpager inflate-exception
I’ve been trying to create a Pager for my application that runs on <uses-sdk android:minSdkVersion=”10″ android:targetSdkVersion=”15″ /> I wrote my code according to this blog post. XML for Pager activity:<?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”android:layout_width=”match_parent”android:layout_height=”match_parent”android:orientation=”vertical” ><android.support.v4.view.ViewPagerandroid:id=”@+id/instructi
user2570350
android eclipse nullpointerexception android-viewpager android-mediaplayer
I made an app that You can swipe through images and every image You touch plays sound. Well, and then I have a little problem with NullPointerException. The best part is that first several click it actually plays sound. Maybe You will know what’s going on?Code looks like this:public class ViewPagerAdapter extends PagerAdapter { // Declare Variables Context context; String[] rank;; int[] gun; int[] sounds; LayoutInflater inflater; MediaPlayer mediaPlayer;public ViewPagerAdapter(Context context, S
Immanuel .I. George
java android android-viewpager surface viewpagerindicator
09-05 20:25:41.677: E/Surface(11901): Surface (identity=16464) requestBuffer(1, 0, 0, 0, 00000033) returned a buffer with a null handle 09-05 20:25:41.677: E/Surface(11901): getBufferLocked(1, 0, 0, 0, 00000033) failed (Out of memory) 09-05 20:25:41.677: E/Surface(11901): dequeueBuffer failed (Out of memory) 09-05 20:25:41.677: E/ViewRoot(11901): OutOfResourcesException locking surface 09-05 20:25:41.677: E/ViewRoot(11901): android.view.Surface$OutOfResourcesException 09-05 20:25:41.677: E/ViewR
user2309862
android android-fragments nullpointerexception android-viewpager fragmentpageradapter
I get this error when I try and create a ViewPager for an Activity:FATAL EXCEPTION: main java.lang.NullPointerException at com.blutech.viewpager.PlaceHolderFragment.newInstance(PlaceHolderFragment.java:44) at com.blutech.viewpager.LayoutSlideActivity$SectionsPagerAdapter.getItem(LayoutSlideActivity.java:94) at android.support.v4.app.FragmentPagerAdapter.instantiateItem(FragmentPagerAdapter.java:97) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:832) at android.support.v4.view.Vie
Jaison Brooks
android actionbarsherlock android-viewpager viewpagerindicator
I have this app using a ViewPager and ViewPagerIndicator and for some reason i keep getting the following error below. I cant seem to figure out why the error is populating. Any help would be greately appreciated. Based on the stack trace i believe its a issue with my main.xml on the line that the viewpager starts, but there is nothing that i havnt done before. Is this maybe coming from the librarys side?E/ActivityThread(1220): Failed to inflateE/ActivityThread(1220): android.view.InflateExcepti
Goo
android android-viewpager viewpagerindicator
I am using viewpager for displaying 7 pages . I am also using viewpagerindicator lib to get as no of circles as the pages are in viewpager.When i scroll pages in viewpager I want to display user that you are in page 1 , pager 2 … . respectively. when he scroll the pages in viewpager.i am using getcurrentitem() of pagedapter to get in which page i am .. But it go not give me correct result.Is i am doing some thing wrong? How to count exact page number in viewpager ?I tried two ways. First sc
Vituel
android webview android-webview android-viewpager pager
My pager has one webview inside each fragment. The webviews themselves don’t scroll, i.e. their content fit entirely in them.The problem is the scrolling of the pager doesn’t behave as expected. The webview content only follows the scrolling when going through the right edge of the screen (i.e. moving out/in to/from the right). When a webview is going through the left edge though it’s content stays still (so that it looks like the next page is sliding over it, like cards).I tried having other co
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
teenslayer
android api maps fragment mapfragment
I’m trying to create a simple tablet app with a listview of map items and a mapview that will pan to whatever location the specific map item selected is.I am currently able to use google maps android api v2 to create a map fragment that instantializes google maps on my application. But, when I add another fragment, it starts crashing.. I’m wondering if this has to do with the other fragment being an extension of fragmentactivity, while mapfragment is and extension of activity?Any idea how I can
AMGG
android android-3.0 android-fragments fragment
I’m experiencing “unexpected behaviour” when using add() method to add a new fragment.I want to add a new fragment on a FrameLayout, but when I do it the previous fragment stills visible.Is this the expected result when using add() method? It is because I am using a FrameLayout and add() method just place a fragment over the FrameLayout without affect the previous one?Thx
SimonSays
android fragment drawer
I want to create a drawer functionality, similar to the Facebook app, with two overlaying fragments.The main layout looks as following:<merge xmlns:android=”http://schemas.android.com/apk/res/android” ><fragmentandroid:id=”@+id/menu” android:name=”ch.simon.drawertest.MenuFragment”android:layout_width=”match_parent”android:layout_height=”match_parent”android:layout_marginRight=”80dp” /><fragmentandroid:id=”@+id/home” android:name=”ch.simon.drawertest.HomeScreenFragment”android:layo
ohmer
fragment
I am in trouble when trying to get the baseView(inflated in onCreateView and returned) in fragment,but recieve unexpected NoSaveStateFrameLayout. I don,t know why,is there anyone can explain this for me,thanks very much. code:@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {LogUtil.d(TAG, “onCreateView …”);View v = inflater.inflate(R.layout.gen_blank, container, false);return v;}when i run this code in all life cycle:LogUtil.v(TAG, “g
Waza_Be
android activity restart fragment
I am just trying to adapt some of my applications for HoneyComb.The issue iI am facing is the destruction of my activity on orientation change (landscape/portrait)When I was using a classic activity, I wrote in the manifest:But now, all these lines aren’t working anymore!Is there a workaround for that?My code:<activity android:name=”.TwitterActivity” android:label=”@string/app_name”android:configChanges=”keyboardHidden|orientation” /><activity android:name=”.TwitterActivity$AppListFragm
Markus Lausberg
eclipse plugins merge patch fragment
In my plugin de.support.help are the plugin.properties files. These properties files include the strings for the preference page.I want to use this plugin for different customers, but the customer name is inside the properties files.I want to patch the properties files by using the eclipse fragment mechanism. As far as i now the fragment plugin can patch the coresponding plugin at runtime.I do have the file plugin.properties in plugin de.support.help which includes the lineplugin.name = Copyri
footprint.
android tabs fragment android-actionbar
I have some questions regarding android action bar and tab fragments. I have 3 fragments and whenever the third fragment is selected, then I will show the menu item on the actiobar.how should i go about it?I tried referencing to the button at runtime and set the visibility to true, but it seems to be null.
TJamesBoone
java plugins import fragment
In my application I have a plugin that has a file in a package that tries to import a package that exists in another fragment but with no success. I’ve tried to update the exported packages in the fragment and then import the package in the plugin but have had no success. Please advice.
Mike P.
android google-maps android-actionbar actionbarsherlock fragment
I’m running into a (I’m sure) silly problem and could use another set of eyes.I have an app that requires GoogleMaps be shown in several places in the app. I have it successfully shown in my main activity, all Play libraries are in place, V2 key is all set-up, etc.My (truncated) mapview.xml looks like:<fragment xmlns:android=”http://schemas.android.com/apk/res/android”xmlns:map=”http://schemas.android.com/apk/res-auto”android:id=”@+id/map”android:layout_width=”match_parent”android:layout_heig
Web site is in building