New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application crashes even if I haven't used KontaktCloud SDK #131
Comments
My build.gradle script, I used flatDir to import all java libraries in a single folder: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { allprojects { task clean(type: Delete) { |
My AndroidManifest.xml
|
@vegax87 I'm actually interested in a file that your dependencies are defined in (the one where you put |
I've already tried to add in build.gradle: dependencies { but it displays this error in Android Studio: Error:(9, 0) Could not find method compile() for arguments [com.kontaktio:sdk:3.1.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. |
@vegax87 If your project is just a small sample app than would you mind sharing it (via Google Drive or anything else could be email) with me as a ZIP or RAR file. It will be much easier for me to just try to run it on my computer and my Android devices to see whats going on. |
what's your email? |
Use the one from my Github profile: m.drabik@kontakt.io |
@vegax87 Thanks, I will check it out and get back to you when I can. |
@vegax87 I've managed to track and fix the problem. The issue was that you used JAR file and not gradle dependency. SDK needs to see some sub-dependencies (like Retrofit or GSON). So you either need to download these JARS and also include them in your project or just use Gradle dependency for our SDK and let Gradle take care of this for you. I've sent you back your project where I added misssing JARs for you. It's working just fine. This information should be included in our documentation. Sorry for that. We will add it soon. |
I'm following the quickstart tutorials to build a simple app with KontaktSDK.initialize("MY-API-KEY"); compiling is ok, but when I start my app on my tablet (Android 4.4), it crashes..
java.lang.NoClassDefFoundError: okhttp3.OkHttpClient$Builder
at com.kontakt.sdk.android.cloud.KontaktCloud.buildHttpClient(KontaktCloud.java:190)
at com.kontakt.sdk.android.cloud.KontaktCloud.(KontaktCloud.java:88)
at com.kontakt.sdk.android.cloud.KontaktCloud.newInstance(KontaktCloud.java:73)
at com.kontakt.sdk.android.ble.manager.internal.InternalProximityManager.(InternalProximityManager.java:55)
at com.kontakt.sdk.android.ble.manager.ProximityManager.(ProximityManager.java:39)
at beacon.opendax.com.testbeacon.MainActivity.onCreate(MainActivity.java:67)
at android.app.Activity.performCreate(Activity.java:5458)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2470)
at android.app.ActivityThread.access$900(ActivityThread.java:174)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1307)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5593)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
My permissions in AndroidManifest.xml:
uses-permission android:name="android.permission.BLUETOOTH"
uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
uses-permission android:name="android.permission.REAL_GET_TASKS"
uses-feature android:name="android.hardware.bluetooth_le" android:required="true"
The text was updated successfully, but these errors were encountered: