pimentazores
Aspiring developer
Profile
Posts: 47
Reg: Mar 26, 2013
Barcelona
8,020
05/28/13 03:25 PM (12 years ago)

Problem parsing the package

Hi Guys, I'm trying to ad admod or revmob into my app, but after configuration on the project I have this error when trying to install on my mobile "THERE IS A PROBLEM PARSING THE PACKAGE" I have already tried: - two different projects/apps - two different ads services (admob and revmob) - installing on two different devices - Tutorials I have found here in BT (like Sandeep), google and REVMOB Tutorials, and many others... So far with no better results. The Apps are working fine without the ads service configuration. Any clue?... Thanks!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/28/13 05:31 PM (12 years ago)
Hi @pimentazores, what steps have you taken so far to add admob/revmob? Did you recompile your apk? That error can sometimes mean you have an old version of the app on your device, try uninstalling any versions you already have on your phone. On older devices it might also mean that there's not enough space on your phone to install the app.
 
pimentazores
Aspiring developer
Profile
Posts: 47
Reg: Mar 26, 2013
Barcelona
8,020
like
05/29/13 03:38 PM (12 years ago)
Hi Raveyd, many thanks in advance for you quick answer! Before going trough the steps I've been so far, let me tell you that I uninstalled the apk old version from my device before trying to install the new one (I also tried no to do that just to see if would work...) Respect to "older devices", if that was the problem then I wouldn't be able to install the apk without the ads configuration, right? For each try I have an ads and a non-ads version, and the version without the ads can always be installed easily. I do recompile my apk each time I try to add admob or revmob. So, this is how I've tried to configure, in this case, revmob, in my apk (I'm doing the steps again as I'm writing them): 1 - I have registered previously my apk on revmob site 2 – copy/paste the file ‘revmob-6.6.6.jar’ into folder libs, inside my project (before importing it into eclipse) 3- after importing the project to eclipse > java build path > libraries > add JARs and select the file REVMOB from the folder libs. Then >Order and Export, I select the .jar file, and OK 4 – Manifest.xml 4.1 - I change the sdk version from 8 to 13 4.2 - I add the line <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> to the manifest, all the other required permissions are already there 4.3 – I add the line <activity android:name="com.revmob.ads.fullscreen.FullscreenActivity" android:configChanges="keyboardHidden|orientation" ></activity> just before <!-- THE NEXT LINE IS ONLY USED IF MAPS ARE USED --> 4.4- I change the manifest to debuggable=false Save and exit from manifes.xml, and update the project to API 13 5 – BT_activity_base.java 5.1 – I open the file src/com/(myproject)/ BT_activity_base.java 5.2 – On the 3rd line, after “package com.(myproject), I put the following lines: import android.os.Bundle; import android.app.Activity; import android.view.View; import com.revmob.RevMob; So, this is how it looks after the changes: /* File Version: 3.0 package com.historiasmisteriosas2; (this is my project) import android.os.Bundle; import android.app.Activity; import android.view.View; import com.revmob.RevMob; import static com.historiasmisteriosas2.BT_gcmConfig.EXTRA_MESSAGE; import org.json.JSONObject; (and then there are several lines import android.XXXXXX) 5.3 – After VISIBLE = 0;, I add the last two lines shown below: //visible / showing public static final int INVISIBLE = 4; public static final int VISIBLE = 0; private static final String REVMOB_APP_ID = "your RevMob App ID here"; private RevMob revmob; (I change your RevMob App ID here for my revmob app ID) 5.4 – and finally, I add the last to lines shown below: //onCreate @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); BT_debugger.showIt(activityName + ":onCreate (BASE CLASS)"); // Starting RevMob session revmob = RevMob.start(this, REVMOB_APP_ID); 6 – before exporting the project, I do a PROJECT> CLEAN and a FILE>REFRESH 7 – I uninstall the old app version from my device, try to install the new version and get the message: there is a problem parsing the package
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/29/13 05:47 PM (12 years ago)
Great step by step! Code looks good.. A couple of things I can suggest to try. I often encounter various problems adding code to the BT_activity_base. Try removing the code from there and putting it in the screens where you want to show ads, for example the BT_screen_menuButtons.java file. Also, this line of code: // Starting RevMob session revmob = RevMob.start(this, REVMOB_APP_ID); Put it at the end of the onCreate method after everything else has loaded up. You could try putting that last line at the end of the onCreate of the activity_base first, before trying it in the individual screens. Try that and let us know if that's any better.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/29/13 06:41 PM (12 years ago)
Got it! It just occured to me on the way to bed, had to fire up the pc again... In the manifest, you've changed the sdk version from 8 to 13. Don't do that. Put it back to 8, and make the build target at least api 13. (right click your project > properties > android > select google api 13 or higher).
 
pimentazores
Aspiring developer
Profile
Posts: 47
Reg: Mar 26, 2013
Barcelona
8,020
like
06/01/13 09:51 AM (12 years ago)
Raveyd: Wow! That really solved it!! (Putting sdk version back to 8). After 3 weeks trying every possible thing and it was something so 'simple'...thanks again for comming back from your way to bed!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/02/13 03:56 AM (12 years ago)
Yey! Glad it's fixed. All credit to your great step by step or we'd still be scratching our heads!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.