问题
I am very beginner for this Estimote Beacons i just tried to Convert Estimote Demo Android Studio Project into Eclipse IDE. but I'm getting pretty close, but I'm having some trouble on Library file. I am following the Estimote Android SDK Guide on GitHub at https://github.com/Estimote/Android-SDK.
I just want to create demo app for Estimote Notification.
Logcat Error :
java.lang.NoClassDefFoundError: com.estimote.sdk.EstimoteSDK
This is the line its indicate :
EstimoteSDK.initialize(this, "YOUR APP ID", "YOUR APP TOKEN");
Note :
in very first time i get error in Library File in importing aar file but error not fixed so i just rename it as .jar and then extracted i get classes.jar file with the help of this link
Help me where i am wrong. any help can can be acceptable
回答1:
Estimote's library project is in .aar format. As you can't directly import and use it on Eclipse. You need to make a library project by extracting its all contents.
For doing so, you'll have to do following steps:
UnZIP the AAR into some directory.
Create an empty directory that will be the home for the Android library project. For the rest of these steps, I will refer to this as “the output directory”.
Copy the AndroidManifest.xml, res/, and assets/ directories from the AAR into the output directory.
Create a libs/ directory in the output directory. Copy into libs/ the classes.jar from the root of the unZIPped AAR, plus anything in libs/ in the AAR (e.g., mediarouter-v7 has its own JAR of proprietary bits).
Decide what build SDK you want to try to use. You might just choose the highest SDK version you have installed. Or, you can use the android:minSdkVersion and the -vNN resource set qualifiers to get clues as to what a good build SDK might be. If desired, create a project.properties file with a target=android-NNN line, where NNN is your chosen build SDK. Or, you can address this in Eclipse later on.
Import the resulting project into Eclipse, and if needed adjust the build SDK (Project > Properties > Android). Also, you will need to attach to this library project any library projects it depends upon (e.g., mediarouter-v7 depends upon appcompat-v7).
Reference Link: https://commonsware.com/blog/2014/07/03/consuming-aars-eclipse.html
So as soon as you have done the above steps, you'll have your library project. Now you can import it to your Eclipse workspace. and can use it with your project.
I have made a library project of Estimote's .aar library from same above mentioned steps. You can get it from my repository: https://github.com/TheLittleNaruto/Estimote
来源:https://stackoverflow.com/questions/30231811/estimote-sdk-for-ecilipse