boboP 发表于 2017-4-27 14:15 闪退日子是这个吗 04-30 18:37:32.869 25630-25645/appkit.opensource.gizwits.com.myapplication W/art: Suspending all threads took: 32.903ms 04-30 18:37:32.929 25630-25630/appkit.opensource.gizwits.com.myapplication E/AndroidRuntime: FATAL EXCEPTION: main Process: appkit.opensource.gizwits.com.myapplication, PID: 25630 java.lang.RuntimeException: Unable to start activity ComponentInfo{appkit.opensource.gizwits.com.myapplication/com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to org.json.JSONArray at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2365) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2434) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1318) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5446) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:736) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.json.JSONArray at com.gizwits.opensource.appkit.CommonModule.GosDeploy.setMap(GosDeploy.java:532) at com.gizwits.opensource.appkit.CommonModule.GosDeploy.readJSON(GosDeploy.java:514) at com.gizwits.opensource.appkit.CommonModule.GosDeploy.<init>(GosDeploy.java:48) at com.gizwits.opensource.appkit.MessageCenter.init(MessageCenter.java:29) at com.gizwits.opensource.appkit.MessageCenter.<init>(MessageCenter.java:24) at com.gizwits.opensource.appkit.MessageCenter.getInstance(MessageCenter.java:60) at com.gizwits.opensource.appkit.CommonModule.GosBaseActivity.onCreate(GosBaseActivity.java:82) at com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity.onCreate(GosUserLoginActivity.java:155) at android.app.Activity.performCreate(Activity.java:6068) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2318) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2434) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1318) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5446) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:736) |
冰锋 发表于 2017-4-26 12:48 那得看你闪退的日志了 |
boboP 发表于 2017-4-26 12:15 大神还有个问题 我装完了之后闪退 是为什么呢 |
boboP 发表于 2017-4-26 12:14 jar:file:/C:/Program%20Files/Android/Android%20Studio2/plugins/android/lib/android.jar!/icons/formfactors/phone_tablet_32.png Nexus 5X API 25 3 1080 × 1920: 420dpi 25 Android 7.1.1 (Google APIs) x86 1 GB com.android.sdklib.internal.avd.AvdInfo@6700ab14 这个版本可以吗 |
冰锋 发表于 2017-4-26 11:55 不要选择GosDeviceControlActivity运行 |
冰锋 发表于 2017-4-26 11:58 这个你百度搜索相关教程吧,你的AS版本是多少 |
boboP 发表于 2017-4-26 11:22 难的我这样弄完是直接安装在手机上面吗 我该如何安装在手机上 我是完全不懂 |
你是用真机模拟么。你是执行了什么操作之后出现这样的呢 |
boboP 发表于 2017-4-26 10:20 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.gizwits.opensource.appkit" android:versionCode="1" android:versionName="2.5.0.022212" > <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" /> <!-- 极光推送 --> <permission android:name="com.gizwits.opensource.appkit.permission.JPUSH_MESSAGE" android:protectionLevel="signature" /> <!-- Required 一些系统要求的权限,如访问网络等 --> <uses-permission android:name="com.gizwits.opensource.appkit.permission.JPUSH_MESSAGE" /> <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <uses-permission android:name="android.permission.WRITE_SETTINGS" /> <!-- Optional. Required for location feature --> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 极光推送 --> <!-- 百度推送 --> <!-- Push service 运行需要的权限 --> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> <!-- 富媒体需要**的权限 --> <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" /> <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /> <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" /> <!-- SDK 使用权限 --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_LOGS" /> <uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.FLASHLIGHT" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.VIBRATE" /> <!-- 乐鑫配置库中使用的权限(WIFI组播) --> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> <uses-permission android:name="android.permission.GET_TASKS" /> <application android:name=".GosApplication" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity" android:label="@string/app_name" android:theme="@style/My_Start" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <!-- 在此处填写腾讯官网申请的AppKey --> <activity android:name="com.tencent.tauth.AuthActivity" android:launchMode="singleTask" android:noHistory="true" > <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="1105509702" /> </intent-filter> </activity> <activity android:name="com.tencent.connect.common.AssistActivity" android:configChanges="orientation|keyboardHidden|screenSize" android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <!-- 以下是框架中使用的Activity --> <activity android:name=".UserModule.GosRegisterUserActivity" > </activity> <activity android:name=".UserModule.GosForgetPasswordActivity" > </activity> <activity android:name=".ConfigModule.GosDeviceReadyActivity" > </activity> <activity android:name=".ConfigModule.GosDeviceResetActivity" > </activity> <activity android:name=".ConfigModule.GosChooseDeviceActivity" > </activity> <activity android:name=".ConfigModule.GosConfigCountdownActivity" > </activity> <activity android:name=".ConfigModule.GosConfigFailedActivity" > </activity> <activity android:name=".DeviceModule.GosDeviceListActivity" > </activity> <activity android:name=".UserModule.GosChangeUserPasswordActivity"></activity> <activity android:name="zxing.CaptureActivity" android:theme="@android:style/Theme.NoTitleBar" /> <activity android:name=".SettingsModule.GosSettiingsActivity" > </activity> <activity android:name=".SettingsModule.GosAboutActivity" > </activity> <activity android:name=".ConfigModule.GosCheckDeviceWorkWiFiActivity" > </activity> <activity android:name=".ControlModule.GosDeviceControlActivity" > </activity> <activity android:name=".ConfigModule.GosModeListActivity" > </activity> <activity android:name=".ConfigModule.GosAirlinkChooseDeviceWorkWiFiActivity" > </activity> <activity android:name=".ConfigModule.GosAirlinkReadyActivity" > </activity> <activity android:name=".ConfigModule.GosAirlinkConfigCountdownActivity" > </activity> <activity android:name=".UserModule.GosUserManager"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.SharedDeviceListAcitivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.SharedDeviceManagerActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.addSharedActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.twoSharedActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.userSharedActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.DeviceModule.GosMainActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.messageCenterActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.deviceSharedMessageActivity"></activity> <activity android:name="com.gizwits.opensource.appkit.sharingdevice.gosZxingDeviceSharingActivity"></activity> <!-- 极光推送 --> <!-- Required SDK 核心功能 --> <!-- option since 2.0.5 可配置PushService,DaemonService,PushReceiver,AlarmReceiver的android:process参数 将JPush相关组件设置为一个独立进程 --> <!-- 如:android:process=":remote" --> <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 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.gizwits.opensource.appkit" /> </intent-filter> </service> --> <!-- Required --> <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.gizwits.opensource.appkit" /> </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:exported="false" > <intent-filter> <action android:name="cn.jpush.android.ui.PushActivity" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.gizwits.opensource.appkit" /> </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" /> <!-- User defined. 用户自定义的广播接收器 --> <receiver android:name=".PushModule.JPushReceiver" android:enabled="true" > <intent-filter> <!-- Required 用户注册SDK的intent --> <action android:name="cn.jpush.android.intent.REGISTRATION" /> <!-- Required 用户接收SDK消息的intent --> <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!-- Required 用户接收SDK通知栏信息的intent --> <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!-- Required 用户打开自定义通知栏的intent --> <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!-- Optional 用户接受Rich Push Javascript 回调函数的intent --> <action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" /> <!-- 接收网络变化 连接/断开 since 1.6.3 --> <action android:name="cn.jpush.android.intent.CONNECTION" /> <category android:name="com.gizwits.opensource.appkit" /> </intent-filter> </receiver> <!-- Required. For publish channel feature --> <!-- JPUSH_CHANNEL 是为了方便开发者统计APK分发渠道。 --> <!-- 例如: --> <!-- 发到 Google Play 的APK可以设置为 google-play; --> <!-- 发到其他市场的 APK 可以设置为 xxx-market。 --> <!-- 目前这个渠道统计功能的报表还未开放。 --> <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" /> <!-- Required. AppKey copied from Portal --> <meta-data android:name="JPUSH_APPKEY" android:value="4c9f1e9d391d8dbbe343a1bb" /> <!-- 百度推送 --> <!-- push service start --> <!-- 用于接收系统消息以保证PushService正常运行 --> <receiver android:name="com.baidu.android.pushservice.PushServiceReceiver" android:process=":bdservice_v1" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> <action android:name="com.baidu.android.pushservice.action.notification.SHOW" /> <action android:name="com.baidu.android.pushservice.action.media.CLICK" /> <!-- 以下四项为可选的action**,可大大提高service存活率和消息到达速度 --> <action android:name="android.intent.action.MEDIA_MOUNTED" /> <action android:name="android.intent.action.USER_PRESENT" /> <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" /> </intent-filter> </receiver> <!-- Push服务接收客户端发送的各种请求 --> <receiver android:name="com.baidu.android.pushservice.RegistrationReceiver" android:process=":bdservice_v1" > <intent-filter> <action android:name="com.baidu.android.pushservice.action.METHOD" /> <action android:name="com.baidu.android.pushservice.action.BIND_SYNC" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.PACKAGE_REMOVED" /> <data android:scheme="package" /> </intent-filter> </receiver> <service android:name="com.baidu.android.pushservice.PushService" android:exported="true" android:process=":bdservice_v1" > <intent-filter> <action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE" /> </intent-filter> </service> <!-- 4.4版本新增的CommandService**,提升小米和魅族手机上的实际推送到达率 --> <service android:name="com.baidu.android.pushservice.CommandService" android:exported="true" /> <!-- push结束 --> <!-- 此处Receiver名字修改为当前包名路径 --> <receiver android:name=".PushModule.BaiDuPushReceiver" > <intent-filter> <!-- 接收push消息 --> <action android:name="com.baidu.android.pushservice.action.MESSAGE" /> <!-- 接收bind、setTags等method的返回结果 --> <action android:name="com.baidu.android.pushservice.action.RECEIVE" /> <!-- 接收通知点击事件,和通知自定义内容 --> <action android:name="com.baidu.android.pushservice.action.notification.CLICK" /> </intent-filter> </receiver> <!-- 微信登录 --> <activity android:name="com.gizwits.opensource.appkit.wxapi.WXEntryActivity" android:exported="true" android:theme="@android:style/Theme.NoDisplay" /> </application> </manifest> |
boboP 发表于 2017-4-26 10:20 好的 大神 要么加下qq835064103帮帮我吧 这是我的毕业设计 |
版权与免责声明 © 2006-2024 Gizwits IoT Technology Co., Ltd. ( 粤ICP备11090211号 )