【问题标题】:Unity3d crashes android pluginUnity3d 崩溃 android 插件
【发布时间】:2015-04-15 17:12:20
【问题描述】:

我尝试在 android studio 中为 unity3d 创建一个 android 插件,完全遵循一些在线教程。但是每次我修改清单时,游戏都会崩溃。

【问题讨论】:

  • 如果您不提供有关您正在遵循的特定教程、您正在做的特定修改以及崩溃的特定堆栈跟踪的任何信息,您如何期望任何人能够帮助您你的应用程序?

标签: plugins android-studio unity3d crash


【解决方案1】:

Manifest 也有很多问题。我发现可能有用的一件事是,每次安装另一个插件时,请检查目录中的插件是否有另一个清单文件。似乎在构建时统一将采用所有这些清单并从中创建一个清单......这很好。但是当清单导致崩溃时,它很难调试。

您可以尝试将所有清单重命名为其他名称,然后从所有插件清单手动创建清单文件...这样您可以重新排列清单中项目的顺序,看看是否可以解决问题.我知道有时只需重新排列项目就可以解决崩溃问题。

试一试。

瑞恩

【讨论】:

    【解决方案2】:

    请按以下步骤操作:-

    // If your module is a library project, this is needed
    //to properly recognize 'android-library' plugin
    buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.3'
    }
    }
    
    apply plugin: 'android-library'
    
    android {
    compileSdkVersion 17
    buildToolsVersion = 17
    
    sourceSets {
        main  {
            // Here is the path to your source code
            java {
                srcDir 'src'
            }
        }
    }
    }
    
    // This is the actual solution, as in http://stackoverflow.com/a/19037807/1002054
    task clearJar(type: Delete) {
    delete 'build/libs/myCompiledLibrary.jar'
    }
    
    task makeJar(type: Copy) {
    from('build/bundles/release/')
    into('build/libs/')
    include('classes.jar')
    rename ('classes.jar', 'myCompiledLibrary.jar')
    }
    
    makeJar.dependsOn(clearJar, build)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-21
      相关资源
      最近更新 更多