App runs fine on avd but not on actual device

Course Queries Syllabus Queries 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago


I'm kind of new to android, actually this is my first app. The app is not completed through, i wanted to test the UI, it works fine on AVD, but when I copy the .apk file from bin folder to my phone, it installs fine, but wont work ends up with force close error. I have no idea what's the problem, I saw on other post about parsing the content in edittext, i took out the layout and ran it again still not working. again, I am new to this, please help me.

Mainactivity.java

package com.example.studentapp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ExpandableListView;
import android.widget.TextView;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.ExpandableListView.OnGroupCollapseListener;
import android.widget.ExpandableListView.OnGroupExpandListener;

import com.example.studentapp.ExpandableListAdapter;

import android.widget.Toast;

 public class MainActivity extends ActionBarActivity {

    DrawerLayout mDrawerLayout;
    ExpandableListView mDrawerList;
    ExpandableListAdapter listAdapter;
    List<String> listDataHeader;
    HashMap<String, List<String>> listDataChild;
    private ActionBarDrawerToggle actionBarDrawerToggle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        getfragment
                                                
                                                
0 views
0 shares
profilepic.png
manpreet 2 years ago

Read the logcat: noSuchMethodError on line 223. Double click that line in the logcat and you will end up on line 223 of your MainActivity. Tell us the code.

CscCountry is not German?

Or you are running on a device that does not know getActionBar().


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.