android,actionbarsherlock,proguard,viewpagerindicatorRelated issues-Collection of common programming errors


  • Ivan Gromov
    android gradle
    I’m trying to build a unit test project using Gradle and Android Studio, but when i rungradle assembleTest -b path_to_project\build.gradle –stacktrace –infoI get the following IllegalArgumentException:UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException:already added: LinstrumentTest/Java/ru/mail/auth/MockHostProvider; at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)I’ve googled that this exception is thrown because of duplicate dependencies, therefore I

  • wangxigui
    android linux systemtap
    I have installed systemtap on my host ubuntu and android device successfully ,and I compiled the systemtap script with cross-compile successfully, but when I run the script with staprun on android device, i got some following special faults :# /data/systemtap-1.0-omap/bin/staprun /data/local/msyscall_all.koELF??4?I: not found??4?I: not found4?I: not found?I: not found/data/systemtap-1.0-omap/bin/staprun: 5: Syntax error: “(” unexpected #

  • Thilina Chámin Hewagama
    .net android xml parsing pull
    Okay, my issue today is that I am trying to return an XML result from my .NET web service. The XML is generated directly from an SQL stored procedure, and the XML looks like:<?xml version=”1.0″ encoding=”utf-8″ ?> <Details><KlockleId>US0065NOVA</KlockleId> <ListingPrice>54535.612830620680</ListingPrice> <CurrencyCountry>US</CurrencyCountry> <RealStateTax>0.000000000000</RealStateTax> <CommonCharge>0.000000000000</CommonCharge&g

  • user123321
    android
    There are so many things wrong with the following code, but yet no errors and shown/given. btn3.setText(“fud”); should throw an NullPointerException. It doesn’t. I should not be allowed to modify UI elements from a non UI thread. I can and Android doesn’t complain about it. What is going on here?public class TestApp1Activity extends Activity {private static final String TAG = TestApp1Activity.class.getSimpleName(); private Button btn1, btn2, btn3; private ExecutorService threadPool;@Override pro

  • user1145533
    android multithreading android-ndk jni
    I have created a thread in java that does some processing passes the data to legacy C++ using JNI. The C++ code performs some tasks on a separate thread and then returns, at this point I want to callback from JNI into the Java thread rather then the main interface thread. The code seems to build and run without errors, but when CallVoidMethod is called to call back into Java nothing happens, no exceptions or errors, it does seem to invoke the Java code.I am calling AttachCurrentThread which seem

  • Michael Mangeng
    java android textview marquee
    i’ve got a special situation with a proprietary android touch panel. In a Android app i’ve got multiple textview fields on a page which use the marquee feature. => All is working fine but marquee is using nearly 100% cpu load if we have more than about 7 TextView elements on the page.load goes to 0%-1% if marquee is turned off.we are quiet sure that the graphics driver of this touch panel we got here is broken but we have no possibilites to exchange anything there because it’s all closed.In deta

  • Sagar Zala
    android json web-services soap
    I have one problem. My web-service returns JSON data and when i call it using SOAP then the exception is occurred. If i want to call using SOAP and get response in JSON object, if it possible.In below line i get the exception.androidHttpTransport.call(SOAP_ACTION, envelope);Exception is:org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT [

  • m3n0R
    android intellij-idea android-maps-v2
    I’m trying to switch from Eclipse to IntelliJ IDEA for Android developing.Currently I have an Android application which depends on more than 10 libraries (including third libraries and jars).First of all, when I tried to run the application, I got a Dalvik DEX error. I could solve that modifying the scope of the dependencies of my projects, not mine. After I did this, I got this other error, which I don’t know how to solve it…03-11 16:10:10.423: ERROR/AndroidRuntime(10258): FATAL EXCEPTION: ma

  • Rad
    java android
    i am making an sms application where the user types in the contact and the message and then clicks the button butenc. The button has to send the variable phone number and message to another java class where a method receives the data and manipulates it. The Ecc java file is a standalone java class that is linked to various other java classes for operations on the message. I some times get a stackoverflow error and when i manipulate a few things in the code, the application runs and when i click

  • Dipak Keshariya
    android xml-parsing xmlpullparser
    I have the following type of XML that I’m trying to parse. The code that I’m using to parse is this one:parser.nextTag(); parser.require(XmlPullParser.START_TAG, null, “feed”);while(parser.nextTag() == XmlPullParser.START_TAG) {parser.require(XmlPullParser.START_TAG, null, “item”);System.out.println(parser.getName());parser.require(XmlPullParser.END_TAG, null, “item”); }Could someone please tell me what I’m doing wrong? The error I’m getting is XmlPullParserException unexpected type position: TE

  • Leandros
    android junit intellij-idea actionbarsherlock junit4
    I wanna compile ActionBarSherlock in IntelliJ as a library module for my project, but the imports import static org.hamcrest.CoreMatchers.equalTo;, import static org.junit.Assert.assertThat; and import org.junit.Test; can’t be resolved.Any ideas how to fix it? Edit: When I uncomment the ManifestParsingTest.java in ActionBarSherlock and try to compile my project I get these:Android Dex: [MoneyTracker] UNEXPECTED TOP-LEVEL EXCEPTION: […] Android Dex: [MoneyTracker] 1 error; aborting

  • Jan-Henk
    android actionbarsherlock
    I have a simple login layout that contains two EditText fields and a Button to login. The problem is that the ActionBar disappears when the soft keyboard is open and I change the focus from an EditText to the Button, and the ActionBar comes back again when I press back. The problem does not occur when the soft keyboard is closed and I navigate through the EditTexts and Button with the DPAD.I use ActionBarSherlock, and the problem occurs only on Android 2.x emulators, on the 4.x emulators everyth

  • Archie.bpgc
    android android-actionbar actionbarsherlock
    I want something like this:The 3rd icon is for notifications and it is just a png image now. Is it possible to do something, so that i can change the text/number ie.., 03 programatically to show the actual no.of notifications.Thank You

  • Sam-In-TechValens
    android tabs actionbarsherlock
    I am working on Actionbar using Sherlock library. I want to change the Background Image of the Actionbar and Tabs differently. Currently I have changed the Background of the Actionbar successfully via codes at runtime: Drawable myIcon = getResources().getDrawable(R.drawable.blue_menu_background); mActionBar.setBackgroundDrawable(myIcon);But I am getting problem with the Tab background. How can I change the Background of Tabs. Please suggest me.

  • just8laze
    android actionbarsherlock
    I want to change the color of the bottomline of the sherlock actionbar.But I want to change it dynamically. When the user is offline I want it to appear red, when he is logging on I want it orange and when he is succesfully connected the line should be green.How can I achieve this? Thanks.

  • Mrinal
    android android-actionbar actionbarsherlock
    I have a refresh menu item in the action bar and my main layout just consists of a button. so clicking on the refresh menu item should turn it into a spinner and click on the button should stop it spinning. My problem is that when i hit on the refresh button it starts spinning which is correct but now when i rotate it it stops spinning automatically.this is my activity.public class MyActivity extends SherlockActivity implements OnClickListener{View refreshView = null; com.actionbarsherlock.view

  • Carlos

  • BadLuckBrian
    android actionbarsherlock
    I have Integrated an ABS into my application. I have an inflated MenuBar that contains a Refresh button. When i click on the refresh button, it should turn into a ProgressBar, and once my refresh call is completed, it should turn back into a Refresh Button. How can i do this ? Kind Regards,

  • Lucas Jota
    android android-actionbar actionbarsherlock
    I’m using ActionBarSherlock in my project and sometimes need to add one or more items inside the action bar.At this BaixadosFragment class (that extends SherlockFragment), I’m using the following code and it works fine:@Override public void onCreateOptionsMenu(Menu menu,MenuInflater inflater) {inflater.inflate(R.menu.main, menu);super.onCreateOptionsMenu(menu, inflater); }public boolean onOptionsItemSelected(MenuItem item) {switch (item.getItemId()) {case R.id.refresh:refresh();return true;defau

  • user1159819
    android actionbarsherlock
    In the documentation for android.support.v4.app.FragmentManager:”Static library support version of the framework’s FragmentManager. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework’s implementation. See the framework SDK documentation for a class overview.”So, do I need to do a check at runtime and use the appropriate FragmentManager for the android version the app is

  • Andrew Thompson
    java spring proguard
    I am trying to obfuscate a spring web application using ProGuard. I want to keep class and method names, especially the ones used as spring beans. But ProGuard renames local variables to local[class name], for example if I have a User object it renames the local variable to localUser. It also renames method parameters to param[Class name], for example if I have a User parameter the variable name in obfuscated method becomes paramUser. So the obfuscated code becomes pretty readable.I want to prev

  • sunchy
    android proguard illegalargumentexception
    I’m getting a error while trying to make a Proguard version of my Android app.And I can’t google it out. The error is:Unexpected error while performing partial evaluation:Class = [com/skyhookwireless/_sdkkc]Method = [<clinit>()V]Exception = [java.lang.IllegalArgumentException] (Stacks have different current sizes [4] and [1])Unexpected error while shrinking instructions after partial evaluation:Class = [com/skyhookwireless/_sdkkc]Method = [<clinit>()V]Except

  • suresh cheemalamudi
    android obfuscation proguard
    I wanted my app to be progaurd protected. For this i went thru some tutorials, posts and at last from this post i came to know that i should only do this:If you’re using ADT 17 or newer, the documentation is slightly inaccurate. The generated file is proguard-project.txt and will be in the root directory of your project.To enable Proguard, you will need to ignore the “do not modify” warning in project.properties and uncomment the following line:proguard.config=${sdk.dir}/tools/proguard/proguard-

  • Sam
    android proguard
    I’m getting following strange error when running the proguard with android.what this error means,is there any way to fix this issue,I’m using the ProGuard, version 4.4 Android 2.3.12011-05-17 17:55:25 – tests] Optimizing… [2011-05-17 17:55:25 – tests] Proguard returned with error code 1. See console [2011-05-17 17:55:25 – tests] Unexpected error while evaluating instruction: [2011-05-17 17:55:25 – tests] Class = [com/test/service/DownloadBarCodeService] [2011-05-17 17:55:25 – tests]

  • PeeHaa
    java optimization obfuscation proguard
    Is there a procedure by which you can optimize/shrink/select/obfuscate only ‘used by your app’ classes/methods/fields from rt.jar provided by Sun by using some optimization software like ProGuard (or maybe other?). Then you would actually be able to minimize the download size of your application considerably and make it much more secure ? Right?Related questions:Do you know if Sun’s “jigsaw project” which is waited to come out, is intended to automatically handle this particular issue? Did someb

  • Andro Selva
    obfuscation netbeans-7 proguard netbeans-platform
    In applications based on NetBeans Platform 7.2, it is possible to replace the ModuleInstall classes with this code:import org.openide.modules.OnStart; import org.openide.modules.OnStop;@OnStart public final class Installer implements Runnable {@Overridepublic void run() {System.out.println(“enable something…”);}@OnStoppublic static final class Down implements Runnable {@Overridepublic void run() {System.out.println(“disable something…”);}} }My problem is that, after obfuscation, the class lo

  • Vinoth
    java android proguard
    I find myself needing more detail in my reported stack traces, but I’m concerned that by including the extra data (by using -keepattributes SourceFile,LineNumberTable) I’m making my app even easier to reverse engineer. Is this the case, and if so, by how much?

  • Grant Cermak
    spring obfuscation proguard autowired
    I have a library Common.License which I am obfuscating with Proguard: <plugin><groupId>com.pyx4me</groupId><artifactId>proguard-maven-plugin</artifactId><executions><execution><phase>package</phase><goals><goal>proguard</goal></goals></execution></executions><configuration><obfuscate>true</obfuscate><options><option>-dontoptimize</option><option>-renamesourcefileat

  • Christopher Perry
    android spring proguard
    I’m using Spring for Android in my application, and I’m trying to obfuscate/optimize/shrink using Proguard. I’m getting the following exception at runtime:Caused by: org.springframework.web.client.RestClientException: Couldnot write request: no suitable HttpMessageConverter found for requesttype [com.mycompany.myproduct.AuthenticateRequest] and content type[application/json]at org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:610)at org.springf

  • Ranhiru Cooray
    android obfuscation proguard dexguard
    After dexguarding my application I got this error when running my application01-01 04:47:02.948: E/AndroidRuntime(8125): FATAL EXCEPTION: Thread-9 01-01 04:47:02.948: E/AndroidRuntime(8125): java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilder.setEntityResolver 01-01 04:47:02.948: E/AndroidRuntime(8125): at o.?.?(:134) 01-01 04:47:02.948: E/AndroidRuntime(8125): at o.?.?(:82) 01-01 04:47:02.948: E/AndroidRuntime(8125): at android.SHAREDLIBS.network.ISOManager.LoadISOXMLMess

  • Benito Bertoli
    android android-viewpager android-view viewpagerindicator activity-indicator
    I need to get page indicator in the view pager file with images. Here is my code.public class IndicatorActivity extends Activity {/** Called when the activity is first created. */@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);MyPagerAdapter adapter = new MyPagerAdapter();ViewPager myPager = (ViewPager) findViewById(R.id.pager);myPager.setAdapter(adapter);myPager.setCurrentItem(0);TitlePageIndicator indicator = (TitlePage

  • Kuitsi
    android android-layout android-fragments actionbarsherlock viewpagerindicator
    I’m using ActionBarSherlock and ViewPagerIndicator to display Fragments as tabs. One of those Fragments adds items to ActionBar:private String[] mapNames; @Override public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setHasOptionsMenu(true);// init an String array `mapNames` which is used when populating submenu// … } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {inflater.inflate(R.menu.fragment_maps, menu);SubMenu mapNamesMenu = m

  • jjcard
    java android crash nullpointerexception viewpagerindicator
    I am working on my first Android app. When I added a functionality to save and load objects and settings on OnCreate and onRestart the app started crashing on start up. Here is the code I made for setting thingspublic void setSettings() {SharedPreferences settings = getSharedPreferences(“Prefs”, 0);newGame = settings.getBoolean(“newGame”, true);autoDecide = settings.getBoolean(“autoDecide”, true);saved = settings.getBoolean(“saved”, false);if (saved) {player1 = readPlayer(“Player 1”);player2 = r

  • jasdmystery
    android video-streaming android-viewpager videoview viewpagerindicator
    I have set of mp4 videos which are streamed into a VideoView. A view pager is used to swipe between the videos.Problem :When swiping the view pager, it shows the first and second page videos perfectly. But, when the swipe reaches the third pages, the device screen goes blank and I can’t seem to swipe the pages anymore. Working code:public class VideoActivity extends Activity implements OnClickListener { private ViewPager videoViewPager; private CirclePageIndicator videoViewPagerIndicator; privat

  • javvvva
    java viewpagerindicator
    I’m trying to use Jake Wharton’s TitlePageIndicator and having this issue.In the getTitle() method in TitlePageIndicator.java, getPageTitle is red-underlined with an error message saying “The method getPageTitle(int) is undefined for the type PagerAdapter.”private CharSequence getTitle(int i) {CharSequence title = mPagerAdapter.getPageTitle(i);if (title == null) {title = EMPTY_TITLE;}return title.toString();}However, the PagerAdapter.class in android-support-v4.jar attached in this project does

  • Wayne
    android actionbarsherlock proguard viewpagerindicator
    My Project contains some librarys (ViewPagerIndicator, ActionbarSherlock, SlidingMenu…). After using proguard, my application crash every time when starts. Below is error logjava.lang.NoClassDefFoundError:android.support.v4.appp.FragmentActivity$2 at android.support.v4.app.FragmentActivity.<init> (Unknown Source)….And here is my proguard script:-injars bin/classes -injars libs -outjars bin/classes-processed.jar-dontpreverify -repackageclasses ” -allowaccessmodification –

  • dmmh
    android android-fragmentactivity viewpagerindicator android-holo-everywhere
    I am using HoloEveryWhere together with ViewPagerIndicator and am trying to use PreferenceFragment (HoloEveryWhere) in a PreferenceActivity (HoloEveryWhere) and can’t fix the errors…I must be overlooking something part of the log:01-13 20:10:04.310: E/AndroidRuntime(29939): FATAL EXCEPTION: main 01-13 20:10:04.310: E/AndroidRuntime(29939): android.view.InflateException: Binary XML file line #2: Error inflating class <unknown> 01-13 20:10:04.310: E/AndroidRuntime(29939): at android.v

Web site is in building