Giter VIP home page Giter VIP logo

Comments (15)

soulfly avatar soulfly commented on September 2, 2024

It means that your project is too large. You have too many methods. There can only be 65536 methods per application.
It's not a QB issue, but applications issue at all, you need to reduce a number of methods in your app, maybe remove some unused libraries or so

http://stackoverflow.com/questions/15209831/unable-to-execute-dex-method-id-not-in-0-0xffff-65536

from quickblox-android-sdk.

NilaySheth avatar NilaySheth commented on September 2, 2024

First of all thanks a lot for your reply Soulfly, but I am aware of this link and the reason why this error occurs. But the thing is that I am attaching very few libraries and all of them are important for application flow and all are mostly around ~200kb. Before attaching QB, It got compiled very easily. But as you can see tha library "SDK-android.jar" for QB gets heavier than 4Mb.So its mostly the main reason for occurrence of this error. I have got an instinct that there will be many methods in this library that are useless for me. I just asking that is there any way that I can remove them or handle them to compile the project.

Thanks a lot for the help.

from quickblox-android-sdk.

soulfly avatar soulfly commented on September 2, 2024

quickblox android sdk has 19594 methods

from quickblox-android-sdk.

NilaySheth avatar NilaySheth commented on September 2, 2024

Ok, so as of now I managed to run the app after using Proguard for Android. But now when I use signIn with Quickblox using "QBUsers.signIn", it gives me following response:

">>> User was successfully signed in: QBUser{id=1601406, createdAt=Fri Sep 19 12:55:22 GMT+05:30 2014, updatedAt=Sat Sep 27 17:52:09 GMT+05:30 2014, fullName='Nikunj', email='null', login='null', phone='null', website='null', lastRequestAt='Tue Sep 30 10:31:27 GMT+05:30 2014', externalId=null, facebookId=null, twitterId=null, blobId=null, tags='null', customData='null', password='null', oldPassword='null'}"

it gives me "email='null', login='null'". Don't know why ? This runs completely fine if I remove Proguard and run this in my other demo app. So the only plausible reason can be due to Proguard. can you help me out in this issue by mentioning which classes to keep in my "proguard-project.txt".

I have already mentioned below classes:

#QuickBlox
-keep class org.jivesoftware.** { ; }
-keep class com.quickblox.
* { ; }
-keep class * extends org.jivesoftware.smack { public *; }
-keep class com.quickblox.chat.QBChatService.login
* { *; }
-keep class * extends com.quickblox.core.server.BaseService { public *; }

from quickblox-android-sdk.

soulfly avatar soulfly commented on September 2, 2024

We decided to split jars into smaller chunks
So now each module has it's own jar

We are releasing SDK 2.0, so you can check this branch
https://github.com/QuickBlox/quickblox-android-sdk/tree/new_api/jars

from quickblox-android-sdk.

moonandroid avatar moonandroid commented on September 2, 2024

Hello,
Unable to execute dex: method ID not in [0, 0xffff]: 65536
i also faced same issue with eclipe in android.
How to handle this issue.
can any one help me ?

from quickblox-android-sdk.

soulfly avatar soulfly commented on September 2, 2024

@moonandroid we split one fat jar into smaller chunks

did you try this?
https://github.com/QuickBlox/quickblox-android-sdk/tree/master/jars

from quickblox-android-sdk.

moonandroid avatar moonandroid commented on September 2, 2024

#1,no.
But what is use of these jars ?
#2,My app supports number of functionality so all jar required in my app.
All working ok with my app but when i upgrade code for GCM then due to new android-support-v4.jar(with 965kb) ,i got above error.

from quickblox-android-sdk.

soulfly avatar soulfly commented on September 2, 2024

If you don't need some modules - you can save methods count.
Use only jars you need

btw
you can use this tool https://github.com/mihaip/dex-method-counts to count your methods

from quickblox-android-sdk.

moonandroid avatar moonandroid commented on September 2, 2024

Ok,thanks
but how to use dex-method-counts ?

from quickblox-android-sdk.

NilaySheth avatar NilaySheth commented on September 2, 2024

Hi Soulfly,
While we highly appreciate the effort to split the jar into multiple jars, i am still getting this error as I am using most of functionality from these jars just like moonandroid. can you provide us the support of Proguard for these jars as it will resolve this issue in minimal efforts from developers as well as from your side. You can see that most of the 3rd party libraries provide the support for Proguard so that it helps developers and none of there methods get trimmed while securing the app. Currently there is no way the app gets through from login in chat module when I use Proguard in my application.

from quickblox-android-sdk.

soulfly avatar soulfly commented on September 2, 2024

@moonandroid read a GitHub page guide

from quickblox-android-sdk.

soulfly avatar soulfly commented on September 2, 2024

@NilaySheth try to use as well dex-method-counts tool to count your methods

You will see all your dependencies

from quickblox-android-sdk.

NilaySheth avatar NilaySheth commented on September 2, 2024

I am very much aware of my dependencies and the worst thing is that none of them are replaceable.:(
But even if I didn't had these errors and I wanted to integrate Proguard in my project for the security measures, I couldn't make my project run, as it always trim certain methods that are indirectly referenced. For e.g.: I can't get pass the login method for chat.

So if we the developers could get any Proguard support, these types of issues could be resolve and app could me made more secure and more compressed.

from quickblox-android-sdk.

moonandroid avatar moonandroid commented on September 2, 2024

how to run with Ant ?

from quickblox-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.