Unity3d 崩溃 android 插件
Unity3d crashes android plugin
我尝试在 android studio 中为 unity3d 创建一个 android 插件,完全遵循一些在线教程。但是每次我修改清单时游戏都会崩溃。
我对清单也有很多问题。我发现可能有用的一件事是,每次安装另一个插件时,检查目录中的插件是否有另一个清单文件。似乎在构建时统一将采用所有这些清单并从中创建一个清单……这很好。但是当清单导致崩溃时,调试起来就非常困难。
您可以尝试将所有清单重命名为其他名称并从所有插件清单手动创建一个清单文件...这样您就可以重新排列清单中项目的顺序并查看是否正确问题。我知道有时简单地重新排列项目可以解决崩溃问题。
试一试。
瑞安
请按照以下步骤操作:-
// 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
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)
我尝试在 android studio 中为 unity3d 创建一个 android 插件,完全遵循一些在线教程。但是每次我修改清单时游戏都会崩溃。
我对清单也有很多问题。我发现可能有用的一件事是,每次安装另一个插件时,检查目录中的插件是否有另一个清单文件。似乎在构建时统一将采用所有这些清单并从中创建一个清单……这很好。但是当清单导致崩溃时,调试起来就非常困难。
您可以尝试将所有清单重命名为其他名称并从所有插件清单手动创建一个清单文件...这样您就可以重新排列清单中项目的顺序并查看是否正确问题。我知道有时简单地重新排列项目可以解决崩溃问题。
试一试。
瑞安
请按照以下步骤操作:-
// 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
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)