Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6668329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:01:47+00:00 2026-05-26T03:01:47+00:00

I’m getting following strange error when running the proguard with android.what this error means,is

  • 0

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.1

2011-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]   Method      = [onHandleIntent(Landroid/content/Intent;)V]
[2011-05-17 17:55:25 - tests]   Instruction = [170] iload v14
[2011-05-17 17:55:25 - tests]   Exception   = [java.lang.NullPointerException] (null)
[2011-05-17 17:55:25 - tests] Unexpected error while performing partial evaluation:
[2011-05-17 17:55:25 - tests]   Class       = [com/test/service/DownloadBarCodeService]
[2011-05-17 17:55:25 - tests]   Method      = [onHandleIntent(Landroid/content/Intent;)V]
[2011-05-17 17:55:25 - tests]   Exception   = [java.lang.NullPointerException] (null)
[2011-05-17 17:55:25 - tests] java.lang.NullPointerException
[2011-05-17 17:55:25 - tests]   at proguard.evaluation.Variables.iload(Variables.java:228)
[2011-05-17 17:55:25 - tests]   at proguard.evaluation.Processor.visitVariableInstruction(Processor.java:645)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.instruction.VariableInstruction.accept(VariableInstruction.java:306)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:729)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:575)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:533)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute0(PartialEvaluator.java:221)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute(PartialEvaluator.java:180)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.LivenessAnalyzer.visitCodeAttribute(LivenessAnalyzer.java:195)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.evaluation.VariableOptimizer.visitCodeAttribute(VariableOptimizer.java:102)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod(SimplifiedVisitor.java:91)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:439)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass(AllMethodVisitor.java:47)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.ProgramClass.accept(ProgramClass.java:281)
[2011-05-17 17:55:25 - tests]   at proguard.classfile.ClassPool.classesAccept(ClassPool.java:114)
[2011-05-17 17:55:25 - tests]   at proguard.optimize.Optimizer.execute(Optimizer.java:764)
[2011-05-17 17:55:25 - tests]   at proguard.ProGuard.optimize(ProGuard.java:325)
[2011-05-17 17:55:25 - tests]   at proguard.ProGuard.execute(ProGuard.java:114)
[2011-05-17 17:55:25 - tests]   at proguard.ProGuard.main(ProGuard.java:499)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:01:47+00:00Added an answer on May 26, 2026 at 3:01 am

    I had the same problem. here’s the original code:

        boolean mExternalStorageAvailable = false;
        boolean mExternalStorageWriteable = false;
        String state = Environment.getExternalStorageState();
    
        if (Environment.MEDIA_MOUNTED.equals(state)) {
            // We can read and write the media
            mExternalStorageAvailable = true;
            mExternalStorageWriteable = true;
        } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
            // We can only read the media
            mExternalStorageAvailable = true;
            mExternalStorageWriteable = false;
        } else {
            // Something else is wrong. It may be one of many other states, but
            // all we need to know is we can neither read nor write
            mExternalStorageAvailable = false;
            mExternalStorageWriteable = false;
        }
    
        return (mExternalStorageAvailable && mExternalStorageWriteable);
    

    Proguard had problems with the last line! I ended up with 2 solutions.

    Solution #1: not to initialize the 2 boolean variables at the begining:

    boolean mExternalStorageAvailable;
    boolean mExternalStorageWriteable;
    String state = Environment.getExternalStorageState();
    
    if (Environment.MEDIA_MOUNTED.equals(state)) {
        // We can read and write the media
        mExternalStorageAvailable = true;
        mExternalStorageWriteable = true;
    } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
        // We can only read the media
        mExternalStorageAvailable = true;
        mExternalStorageWriteable = false;
    } else {
        // Something else is wrong. It may be one of many other states, but
        // all we need to know is we can neither read nor write
        mExternalStorageAvailable = false;
        mExternalStorageWriteable = false;
    }
    
    return (mExternalStorageAvailable && mExternalStorageWriteable);
    

    Solution #2 is return true/false instead of setting the 2 boolean values.

    String state = Environment.getExternalStorageState();
    
    if (Environment.MEDIA_MOUNTED.equals(state)) {
        // We can read and write the media
        return true;
    } else {
        return false;
    }
    

    This works fine (and might be better) for this case, but I’m happy I didn’t get this problem in a more complex function!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.