极光sdk在android studio中集成出错


(小阿三) #5

另外我也尝试了使用jcenter自动集成,最后还是没有集成成功,请问有针对cocos2dx引擎AndroidStudio开发环境的详细集成文档吗。sdk里面的demo工程导入到Andriod Studio出错的,运行不了。我使用的Android Studio是3.0.1版本的


#6

报这样的错误,请详细阅读

去排查,检查导入的工程目录、路径是否正确

插件:


(小阿三) #7
06-25 16:49:05.585 6751-6751/com.qhooplay.supreme D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.1.3, buildId:405
06-25 16:49:05.594 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [ServiceHelper] We found the appKey is changed or register appkey is empty. Will re-register.
06-25 16:49:05.599 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - ffa20671d2295759e7758fc5
06-25 16:49:05.599 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [JCoreGlobal] metadata: channel - android-default
06-25 16:49:05.600 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.1, buildId:188
06-25 16:49:05.602 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.service.Protocol.<clinit>(Unknown Source)
06-25 16:49:05.602 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.service.Protocol.GetSdkVersion(Native Method)
06-25 16:49:05.602 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.a(Unknown Source)
06-25 16:49:05.602 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.d(Unknown Source)
06-25 16:49:05.602 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.b(Unknown Source)
06-25 16:49:05.602 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.api.JCoreInterface.init(Unknown Source)
06-25 16:49:05.604 6751-6751/com.qhooplay.supreme E/art: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:49:05.604 6751-6751/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] Get sdk version fail![获取sdk版本失败!]
06-25 16:49:05.604 6751-6751/com.qhooplay.supreme W/System.err: java.lang.UnsatisfiedLinkError: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:49:05.605 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.service.Protocol.GetSdkVersion(Native Method)
06-25 16:49:05.605 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.a(Unknown Source)
06-25 16:49:05.605 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.d(Unknown Source)
06-25 16:49:05.605 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.b(Unknown Source)
06-25 16:49:05.605 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.api.JCoreInterface.init(Unknown Source)
06-25 16:49:05.606 6751-6751/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] JCore .so file do not match JCore .jar file in the project, Failed to init JCore
06-25 16:49:05.606 6751-6751/com.qhooplay.supreme W/JIGUANG-JCore: [JCoreInterface] JCore init failed
06-25 16:49:05.627 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [ServiceHelper] We found the appKey is changed or register appkey is empty. Will re-register.
06-25 16:49:05.629 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.1, buildId:188
06-25 16:49:05.630 6751-6751/com.qhooplay.supreme E/art: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:49:05.630 6751-6751/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] Get sdk version fail![获取sdk版本失败!]
06-25 16:49:05.630 6751-6751/com.qhooplay.supreme W/System.err: java.lang.UnsatisfiedLinkError: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:49:05.630 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.service.Protocol.GetSdkVersion(Native Method)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.a(Unknown Source)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.d(Unknown Source)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.b(Unknown Source)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.api.JCoreInterface.init(Unknown Source)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.d.j.b(Unknown Source)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.d.g.b(Unknown Source)
06-25 16:49:05.631 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.a.a.d.a.onActivityStarted(Unknown Source)
06-25 16:49:05.632 6751-6751/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] JCore .so file do not match JCore .jar file in the project, Failed to init JCore
06-25 16:49:05.632 6751-6751/com.qhooplay.supreme W/JIGUANG-JCore: [JCoreInterface] JCore init failed
06-25 16:49:05.634 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [ServiceHelper] We found the appKey is changed or register appkey is empty. Will re-register.
06-25 16:49:05.636 6751-6751/com.qhooplay.supreme D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.1, buildId:188
06-25 16:49:05.636 6751-6751/com.qhooplay.supreme E/art: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] Get sdk version fail![获取sdk版本失败!]
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err: java.lang.UnsatisfiedLinkError: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.service.Protocol.GetSdkVersion(Native Method)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.a(Unknown Source)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.d(Unknown Source)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.b(Unknown Source)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.api.JCoreInterface.init(Unknown Source)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.d.j.b(Unknown Source)
06-25 16:49:05.637 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.api.JCoreInterface.triggerSceneCheck(Unknown Source)
06-25 16:49:05.638 6751-6751/com.qhooplay.supreme W/System.err:     at cn.jiguang.a.a.d.a.onActivityStarted(Unknown Source)
06-25 16:49:05.639 6751-6751/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] JCore .so file do not match JCore .jar file in the project, Failed to init JCore
06-25 16:49:05.639 6751-6751/com.qhooplay.supreme W/JIGUANG-JCore: [JCoreInterface] JCore init failed
06-25 16:49:06.263 6751-6751/com.qhooplay.supreme I/CrashReport: backup java handler: cn.jiguang.a.a.c.e@4abb2c5
06-25 16:53:25.897 6751-6775/com.qhooplay.supreme D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
06-25 16:53:25.906 6751-6775/com.qhooplay.supreme D/JIGUANG-JCore: [ServiceHelper] We found the appKey is changed or register appkey is empty. Will re-register.
06-25 16:53:25.984 6751-6775/com.qhooplay.supreme D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.1, buildId:188
06-25 16:53:25.986 6751-6775/com.qhooplay.supreme E/art: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:53:25.986 6751-6775/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] Get sdk version fail![获取sdk版本失败!]
06-25 16:53:25.987 6751-6775/com.qhooplay.supreme W/System.err: java.lang.UnsatisfiedLinkError: No implementation found for int cn.jiguang.service.Protocol.GetSdkVersion() (tried Java_cn_jiguang_service_Protocol_GetSdkVersion and Java_cn_jiguang_service_Protocol_GetSdkVersion__)
06-25 16:53:25.988 6751-6775/com.qhooplay.supreme W/System.err:     at cn.jiguang.service.Protocol.GetSdkVersion(Native Method)
06-25 16:53:25.988 6751-6775/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.a(Unknown Source)
06-25 16:53:25.988 6751-6775/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.d(Unknown Source)
06-25 16:53:25.988 6751-6775/com.qhooplay.supreme W/System.err:     at cn.jiguang.d.a.b(Unknown Source)
06-25 16:53:25.988 6751-6775/com.qhooplay.supreme W/System.err:     at cn.jiguang.api.JCoreInterface.sendAction(Unknown Source)
06-25 16:53:25.991 6751-6775/com.qhooplay.supreme E/JIGUANG-JCore: [JCoreGlobal] JCore .so file do not match JCore .jar file in the project, Failed to init JCore

这个是我现在的输出日志,能帮忙分析下是什么原因吗


#8

还是一样的呀,jar 和 so 不一致


(小阿三) #9

为什么会出现不一致的问题呢 我都是使用的是最新sdk里面的jar和.so文件呀


#10

这个帖子,仔细的检查你的工程目录,路径,so的复制粘贴


(小阿三) #11


<!-- Required SDK 核心功能-->
        <!-- 可配置android:process参数将PushService放在其他进程中 -->
        <service
            android:name="cn.jpush.android.service.PushService"
            android:enabled="true"
            android:exported="false" >
            <intent-filter>
                <action android:name="cn.jpush.android.intent.REGISTER" />
                <action android:name="cn.jpush.android.intent.REPORT" />
                <action android:name="cn.jpush.android.intent.PushService" />
                <action android:name="cn.jpush.android.intent.PUSH_TIME" />
            </intent-filter>
        </service>

        <!-- since 3.0.9 Required SDK 核心功能-->
        <provider
            android:authorities="com.qhooplay.supreme.DataProvider"
            android:name="cn.jpush.android.service.DataProvider"
            android:exported="true"
            />

        <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
        <!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 -->
        <service
            android:name="cn.jpush.android.service.DaemonService"
            android:enabled="true"
            android:exported="true">
            <intent-filter >
                <action android:name="cn.jpush.android.intent.DaemonService" />
                <category android:name="com.qhooplay.supreme"/>
            </intent-filter>
        </service>

        <!-- since 3.1.0 Required SDK 核心功能-->
        <provider
            android:authorities="com.qhooplay.supreme.DownloadProvider"
            android:name="cn.jpush.android.service.DownloadProvider"
            android:exported="true" />

        <!-- Required SDK核心功能-->
        <receiver
            android:name="cn.jpush.android.service.PushReceiver"
            android:enabled="true" >
            <intent-filter android:priority="1000">
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
                <category android:name="com.qhooplay.supreme"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.USER_PRESENT" />
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
            <!-- Optional -->
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
                <data android:scheme="package" />
            </intent-filter>
        </receiver>

        <!-- Required SDK核心功能-->
        <activity
            android:name="cn.jpush.android.ui.PushActivity"
            android:configChanges="orientation|keyboardHidden"
            android:theme="@android:style/Theme.NoTitleBar"
            android:exported="false" >
            <intent-filter>
                <action android:name="cn.jpush.android.ui.PushActivity" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.qhooplay.supreme" />
            </intent-filter>
        </activity>
        <!-- SDK核心功能-->
        <activity
            android:name="cn.jpush.android.ui.PopWinActivity"
            android:configChanges="orientation|keyboardHidden"
            android:exported="false"
            android:theme="@style/MyDialogStyle">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.qhooplay.supreme" />
            </intent-filter>
        </activity>

        <!-- Required SDK核心功能-->
        <service
            android:name="cn.jpush.android.service.DownloadService"
            android:enabled="true"
            android:exported="false" >
        </service>

        <!-- Required SDK核心功能-->
        <receiver android:name="cn.jpush.android.service.AlarmReceiver" />

        <meta-data android:name="JPUSH_CHANNEL" android:value="android-default"/>
        <meta-data android:name="JPUSH_APPKEY" android:value="ffa20671d2295759e7758fc5"/>

我现在完全按照文档来接入的,会出现这个问题。我把我的libs目录结构和Manifest配置都截图了。 而且我确定现在libs里面各个cpu架构的so库是和sdk里面一样的,并没有放在错误的文件夹下。


#12

现在你的报错涉及到权限的配置,看一下你的包名,applicationID 处的设置是否正确。


(小阿三) #13


#14

1、仔细检查你工程里涉及包名的地方

2、手机里有配置同样包名的app卸载掉

3、提供 manifest 和 build.gradle 看下,提供完整的文件,不截取。

4、将客户端 log ,完整的复制到 TXT 里面传上来


(小阿三) #15

AndroidManifest.xml (6.7 KB)
build.gradle (8.5 KB)
jpush.log.txt (32.2 KB)

工程中包名我检测过了,确认包名使用的地方都是正确的。手机上也没有同名的app


#16

你是自动集成和手动集成同时进行了吗?我看你 gradle 里还配了自动集成的

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':libcocos2dx')
    compile files('libs/jcore-android-1.2.1.jar')
    compile files('libs/jpush-android-3.1.3.jar')
}

(小阿三) #17

这个不是自动集成,这个是引用了本地的库 删除也是一样的。就和compile fileTree(include: [’*.jar’], dir: ‘libs’) 的作用是一样的


#18

提供下proguard文件


(小阿三) #19

proguard-rules.pro (878 字节)


#20

四大组件的继承类混淆要去掉


(小阿三) #21
-dontoptimize
-dontpreverify

-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }

-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }

是这样吗


#22

keep的意思是去掉混淆,加上这些:

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.app.IntentService
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider

(小阿三) #23

proguard-rules.pro (1.2 KB)
jpush.log2.txt (51.5 KB)

现在的错误日志和混淆文件


#24

你现在给的日志里面没有极光相关的日志