Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试从Unity构建Android应用程序时出现java.lang.ClassNotFoundException_Java_Android_Build_Unity3d_Classnotfoundexception - Fatal编程技术网

尝试从Unity构建Android应用程序时出现java.lang.ClassNotFoundException

尝试从Unity构建Android应用程序时出现java.lang.ClassNotFoundException,java,android,build,unity3d,classnotfoundexception,Java,Android,Build,Unity3d,Classnotfoundexception,在尝试构建Android时,我立即遇到了崩溃。我一直没有问题,直到我试图改变捆绑ID,以便我们可以建立一个不同版本的应用程序。我怀疑这与使用playhaven等插件有关。我所做的唯一更改是更改bundle id,从那以后,它在启动时立即崩溃,甚至没有出现在初始屏幕上。我对android开发没有经验,这可能是显而易见的。任何帮助都会很好的,这真的把我绊倒了 谢谢 AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <

在尝试构建Android时,我立即遇到了崩溃。我一直没有问题,直到我试图改变捆绑ID,以便我们可以建立一个不同版本的应用程序。我怀疑这与使用playhaven等插件有关。我所做的唯一更改是更改bundle id,从那以后,它在启动时立即崩溃,甚至没有出现在初始屏幕上。我对android开发没有经验,这可能是显而易见的。任何帮助都会很好的,这真的把我绊倒了

谢谢

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.evodent.fannex.fgo" android:theme="@android:style/Theme.NoTitleBar" android:versionName="1.5.7.0" android:versionCode="3" android:installLocation="preferExternal">
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
    <activity android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="fullSensor" android:hardwareAccelerated="true" android:name="com.evodent.fannex.fgo.OverrideExample">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <!-- Example deep link
            <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="company" android:host="===your app's package name here===" />
            </intent-filter>
            -->
      <meta-data android:name="android.app.lib_name" android:value="unity"/>
      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true"/>
    </activity>
    <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="sensor">
        </activity>
    <activity android:name="com.playhaven.android.view.FullScreen" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:windowSoftInputMode="adjustResize" android:configChanges="orientation|keyboardHidden|screenSize">
      <!-- Support FullScreen.createIntent -->
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
      </intent-filter>
      <!-- Support Uri.parse -->
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:scheme="playhaven" android:host="localhost" android:pathPattern="/full"/>
      </intent-filter>
    </activity>
    <receiver android:name="com.playhaven.android.push.PushReceiver">
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="com.playhaven.android"/>
      </intent-filter>
    </receiver>
    <!-- This is needed to receive Google Cloud Messaging intents from the system. -->
    <receiver android:name="com.playhaven.android.push.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
      <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
        <action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
        <category android:name="com.evodent.fannex.fgo"/>
      </intent-filter>
    </receiver>
  </application>
  <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
  <uses-feature android:glEsVersion="0x00020000"/>
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.WAKE_LOCK"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <!-- This is needed to receive Google Cloud Messaging intents from the system. -->
  <!-- <permission android:name="com.evodent.fannex.fgo.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
  <uses-permission android:name="com.evodent.fannex.fgo.permission.C2D_MESSAGE"/>
  <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> -->
  <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
  <uses-feature android:name="android.hardware.touchscreen"/>
  <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false"/>
  <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false"/>
</manifest>

这是一个在旧bundle_id下编译的插件。我解压缩了jar,使用java类编辑器更改类中的名称和目录以匹配新的bundle id,然后更新jar文件夹以匹配它,例如company/name/overrideeexample.class。然后我将新的目录和类文件重新装入jar,它就工作了。

您是否更改了构建设置中的包标识符。您是否更改了本机文件jar上的包名?本机文件jar在哪里?它来自哪里~~~>OverrideeExample我不确定,我继承了该项目。我可以在不必重新编译包的情况下更新jar文件中的包id吗?我不确定我是否有权访问原始源代码。我找到了它,但它在一个Jar中,我正在尝试更新OverrideeExample.class以反映新名称。我正在更改jar的文件结构,并且它必须与类匹配。我会让你知道它是否有效,谢谢你的帮助
D/SurfaceFlinger( 1522): screenshot: sw=180, sh=320, minZ=0, maxZ=21020
I/ActivityManager( 1904): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.evodent.fannex.fgo/.OverrideExample bnds=[14,163][127,322]} from pid 13450
I/libblt_hw( 1522): Library opened (handle = 0, fd = 28)
I/ActivityManager( 1904): Start proc com.evodent.fannex.fgo for activity com.evodent.fannex.fgo/.OverrideExample: pid=4034 uid=10167 gids={3003, 1015, 1006}
D/OpenGLRenderer(13450): Flushing caches (mode 1)
D/OpenGLRenderer(13450): Flushing caches (mode 0)
D/AndroidRuntime( 4034): Shutting down VM
W/dalvikvm( 4034): threadid=1: thread exiting with uncaught exception (group=0x40a96210)
E/AndroidRuntime( 4034): FATAL EXCEPTION: main
E/AndroidRuntime( 4034): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.evodent.fannex.fgo/com.evodent.fannex.fgo.OverrideExample}: java.lang.ClassNotFoundException: com.evodent.fannex.fgo.OverrideExample
E/AndroidRuntime( 4034):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891)
E/AndroidRuntime( 4034):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
E/AndroidRuntime( 4034):    at android.app.ActivityThread.access$600(ActivityThread.java:127)
E/AndroidRuntime( 4034):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
E/AndroidRuntime( 4034):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 4034):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4034):    at android.app.ActivityThread.main(ActivityThread.java:4448)
E/AndroidRuntime( 4034):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4034):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4034):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
E/AndroidRuntime( 4034):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
E/AndroidRuntime( 4034):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 4034): Caused by: java.lang.ClassNotFoundException: com.evodent.fannex.fgo.OverrideExample
E/AndroidRuntime( 4034):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
E/AndroidRuntime( 4034):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
E/AndroidRuntime( 4034):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
E/AndroidRuntime( 4034):    at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
E/AndroidRuntime( 4034):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882)
E/AndroidRuntime( 4034):    ... 11 more
D/SurfaceFlinger( 1522): screenshot: sw=180, sh=320, minZ=0, maxZ=21025
W/ActivityManager( 1904):   Force finishing activity com.evodent.fannex.fgo/.OverrideExample
I/libblt_hw( 1522): Library opened (handle = 5, fd = 25)
I/libblt_hw( 1522): Library closed (handle = 1, fd = 26)
W/ActivityManager( 1904): Activity pause timeout for ActivityRecord{41e81790 com.evodent.fannex.fgo/.OverrideExample}
I/libblt_hw( 1522): Library opened (handle = 1, fd = 26)