我按照说明,新建一个application类继承了DCloudApplication,这个application是在library库里面,
然后我在app项目的mainifest.xml里将android:name改为了新的application,但打包运行启动期间根本不进新的application的onCreate()
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.HBuilder.integrate">
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
<!-- 语音聊天 -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- 语音聊天 end -->
<!-- Barcode(二维码) begin -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<!-- Barcode(二维码) end -->
<!--io.dcloud.application.DCloudApplication-->
<application
android:name="com.example.voice.anyrtc.CallApplication"
android:allowBackup="true"
android:allowClearUserData="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:largeHeap="true"
android:debuggable="true"
android:supportsRtl="true"
tools:ignore="HardcodedDebugMode"
tools:replace="android:name">
<!-- 应用入口 -->
<activity
android:name="io.dcloud.PandoraEntry"
android:theme="@style/TranslucentTheme"
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale"
android:label="@string/app_name"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<data android:scheme="hbuilder"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
<intent-filter>
<data android:mimeType="image/*"/>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
3 个回复
kysin - 扶不起的蝌蚪
楼主解决了吗,我继承了Application后点击调试就没反应了
5***@qq.com
解决了吗
w***@gmail.com
I wanna konw how to do.