单击打开我的Cordova应用程序的URL时,java.lang.ClassNotFoundException异常

我有一个Meteor Cordova应用程序,我想为Android添加应用程序链接。 我将以下内容添加到我的mobile-config.js文件中:

App.appendToConfig(`
<platform name="android">
  <config-file target="app/src/main/AndroidManifest.xml" parent="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
    <activity android:name="com.myApp.app.Shareactivity" >
        <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="https" android:host="www.myApp.com" android:pathPrefix="/" />
          <data android:scheme="https" android:host="myApp.com" android:pathPrefix="/" />
        </intent-filter>
    </activity>
  </config-file>
</platform>
`)

当用户单击www.myApp.com时,我的应用程序显示为“打开方式”的选项,但启动时崩溃。

Logcat将打印以下内容:

Caused by: java.lang.ClassnotFoundException: Didn't find class "com.myApp.app.Shareactivity" on path: DexPathList[[zip file "/data/app/com.myApp.app-ECzBicrUAKTa-p_De1P_rg==/base.apk"],nativelibraryDirectories=[/data/app/com.myApp.app-ECzBicrUAKTa-p_De1P_rg==/lib/arm64,/system/lib64]]

我认为这行是错误的: <activity android:name="com.myApp.app.Shareactivity" >

我应该在这里使用什么android:name?

jasonlevon 回答:单击打开我的Cordova应用程序的URL时,java.lang.ClassNotFoundException异常

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3092709.html

大家都在问