sphero-inc / Sphero-Android-SDK

🚫 DEPRECATED REPO: Sphero™ is the amazing robotic ball ( gosphero.com ), this is the repository for the Android SDK for Sphero™. Visit dev site for more information:
https://developer.gosphero.com
160 stars 86 forks source link

leaked IntentReceiver orbotix.robot.base.RobotProvider #9

Closed lemonnm closed 9 years ago

lemonnm commented 10 years ago

Hi,

When i try the project helloWorld i had this error : HelloWorldActivity has leaked IntentReceiver orbotix.robot.base.RobotProvider$1@41f2eb10 that was originally registered here. Are you missing a call to unregisterReceiver()?

With log : HelloWorld﹕ Found: [[Robot: Sphero-BOR @68:86:E7:01:C4:12 connected=false]] HelloWorld﹕ Found 1 robots

I word with Android Studio and nexus 7 2012 with Android 4.4

Thx,

Matthieu

ecemm commented 10 years ago

Hi Matthieu, I have the same problem. Did you fix it? I'd be glad if you share it.

Thanks,

Ecem

lemonnm commented 10 years ago

Hello,

Sorry, Is not fix...

I wait correction of orbotix!

Matthieu Lemonnier

ecemm commented 10 years ago

Hi, I just found a quick solution for the problem. The sample projects run normally on my device (Android 4.3), but when I create an Android project and try the very same code, it gives me the exception. So I checked the differences like manifest file, project.properties, build path etc. Under the libs folder, the sample projects has armeabi and armeabi-v7a folders, but my project does not. When I copied and pasted it under libs folder, the problem got solved. If you're searching for a quick solution, give it a try!

Ecem

mnsn commented 10 years ago

I have them both but still got the error (also in the samples )

razem-io commented 10 years ago

Hi, if you are using android studio you need to move the armeabi and armeabi-v7a folder to src/main/jniLibs/. That fixed the problem for me with android studio. Had the same issue. Did not know that jniLibs have their own folder now.

Should look like this: -> /libs/RobotLibrary.jar -> /libs/src/main/jniLibs/armeabi/libachievement_manager.so -> /libs/src/main/jniLibs/armeabi-v7a/libachievement_manager.so

In your gradle file it is also important to have this line: compile fileTree(dir: 'libs', include: ['.jar', '.aar'])

But by default this is created when you start a new project.

ecemm commented 10 years ago

Yeah that's what I did for Eclipse SDK too.

zenelk commented 9 years ago

I am closing this as it should be fixed by the beta SDK. Please open a new issue if the problem persists on the beta branch.