修复 Android5以下退出编辑器时卡死的问题
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -24,9 +24,6 @@ android {
|
|||||||
versionName versions.appVersionName
|
versionName versions.appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
ndk {
|
|
||||||
abiFilters 'armeabi-v7a', 'x86'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
@@ -49,34 +46,40 @@ android {
|
|||||||
disable 'MissingTranslation'
|
disable 'MissingTranslation'
|
||||||
disable 'ExtraTranslation'
|
disable 'ExtraTranslation'
|
||||||
}
|
}
|
||||||
android.applicationVariants.all { variant ->
|
|
||||||
variant.outputs.all {
|
|
||||||
outputFileName = "${variant.name}-${variant.versionName}.apk"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
|
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "channel"
|
flavorDimensions "channel"
|
||||||
|
splits {
|
||||||
|
|
||||||
|
// Configures multiple APKs based on ABI.
|
||||||
|
abi {
|
||||||
|
|
||||||
|
// Enables building multiple APKs per ABI.
|
||||||
|
enable true
|
||||||
|
|
||||||
|
// By default all ABIs are included, so use reset() and include to specify that we only
|
||||||
|
// want APKs for x86 and x86_64.
|
||||||
|
|
||||||
|
// Resets the list of ABIs that Gradle should create APKs for to none.
|
||||||
|
reset()
|
||||||
|
|
||||||
|
// Specifies a list of ABIs that Gradle should create APKs for.
|
||||||
|
include "x86", "armeabi-v7a"
|
||||||
|
|
||||||
|
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
|
||||||
|
universalApk false
|
||||||
|
}
|
||||||
|
}
|
||||||
productFlavors {
|
productFlavors {
|
||||||
common {
|
common {
|
||||||
buildConfigField "String", "CHANNEL", '"common"'
|
buildConfigField "String", "CHANNEL", '"common"'
|
||||||
ndk {
|
|
||||||
abiFilters "armeabi-v7a"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
coolapk {
|
coolapk {
|
||||||
buildConfigField "String", "CHANNEL", '"coolapk"'
|
buildConfigField "String", "CHANNEL", '"coolapk"'
|
||||||
}
|
}
|
||||||
x86 {
|
|
||||||
buildConfigField "String", "CHANNEL", '"common"'
|
|
||||||
ndk {
|
|
||||||
abiFilters "x86"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":253,"versionName":"4.1.0 Alpha3","enabled":true,"outputFile":"inrt-release.apk","fullName":"release","baseName":"release"},"path":"inrt-release.apk","properties":{}}]
|
[{"outputType":{"type":"APK"},"apkInfo":{"type":"FULL_SPLIT","splits":[{"filterType":"ABI","value":"armeabi-v7a"}],"versionCode":261,"versionName":"4.1.1 Alpha2","enabled":true,"filterName":"armeabi-v7a","outputFile":"inrt-armeabi-v7a-release.apk","fullName":"armeabi-v7aRelease","baseName":"armeabi-v7a-release"},"path":"inrt-armeabi-v7a-release.apk","properties":{}},{"outputType":{"type":"APK"},"apkInfo":{"type":"FULL_SPLIT","splits":[{"filterType":"ABI","value":"x86"}],"versionCode":261,"versionName":"4.1.1 Alpha2","enabled":true,"filterName":"x86","outputFile":"inrt-x86-release.apk","fullName":"x86Release","baseName":"x86-release"},"path":"inrt-x86-release.apk","properties":{}}]
|
||||||
@@ -210,7 +210,7 @@ public class EditActivity extends BaseActivity implements OnActivityResultDelega
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
finishAndRemoveTask();
|
finishAndRemoveTask();
|
||||||
} else {
|
} else {
|
||||||
finish();
|
super.finish();
|
||||||
}
|
}
|
||||||
if (mNewTask) {
|
if (mNewTask) {
|
||||||
startActivity(new Intent(this, MainActivity_.class));
|
startActivity(new Intent(this, MainActivity_.class));
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":256},"path":"coolapkRelease-3.1.0 Beta.apk","properties":{"packageId":"org.autojs.autojs","split":"","minSdkVersion":"17"}}]
|
|
||||||
@@ -14,10 +14,6 @@ android {
|
|||||||
versionName versions.appVersionName
|
versionName versions.appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
ndk {
|
|
||||||
abiFilters 'armeabi-v7a'
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
disable 'MissingTranslation'
|
disable 'MissingTranslation'
|
||||||
@@ -27,6 +23,27 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
splits {
|
||||||
|
|
||||||
|
// Configures multiple APKs based on ABI.
|
||||||
|
abi {
|
||||||
|
|
||||||
|
// Enables building multiple APKs per ABI.
|
||||||
|
enable true
|
||||||
|
|
||||||
|
// By default all ABIs are included, so use reset() and include to specify that we only
|
||||||
|
// want APKs for x86 and x86_64.
|
||||||
|
|
||||||
|
// Resets the list of ABIs that Gradle should create APKs for to none.
|
||||||
|
reset()
|
||||||
|
|
||||||
|
// Specifies a list of ABIs that Gradle should create APKs for.
|
||||||
|
include "x86", "armeabi-v7a"
|
||||||
|
|
||||||
|
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
|
||||||
|
universalApk false
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
@@ -39,30 +56,37 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def buildApkPluginForAbi(File pluginProjectDir, String abi) {
|
||||||
|
copy {
|
||||||
|
from file('..\\app\\release\\')
|
||||||
|
into new File(pluginProjectDir, 'app\\src\\main\\assets')
|
||||||
|
def fileName = "inrt-" + abi + "-release.apk"
|
||||||
|
include fileName
|
||||||
|
rename fileName, 'template.apk'
|
||||||
|
}
|
||||||
|
exec {
|
||||||
|
workingDir pluginProjectDir
|
||||||
|
commandLine 'gradlew.bat', 'assembleRelease'
|
||||||
|
}
|
||||||
|
copy {
|
||||||
|
from new File(pluginProjectDir, 'app\\build\\outputs\\apk\\release')
|
||||||
|
into file('..\\common\\release')
|
||||||
|
def fileName = '打包插件-' + versions.appVersionName + '-release.apk'
|
||||||
|
include fileName
|
||||||
|
rename fileName, '打包插件-' + abi + '-' + versions.appVersionName + '-release.apk'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task buildApkPlugin {
|
task buildApkPlugin {
|
||||||
doLast {
|
doLast {
|
||||||
def pluginProjectDirPath = '..\\..\\AutoJsApkBuilderPlugin'
|
def pluginProjectDirPath = '..\\..\\AutoJsApkBuilderPlugin'
|
||||||
def pluginProjectDir = file(pluginProjectDirPath)
|
def pluginProjectDir = file(pluginProjectDirPath)
|
||||||
if(!pluginProjectDir.exists() || !pluginProjectDir.isDirectory()){
|
if (!pluginProjectDir.exists() || !pluginProjectDir.isDirectory()) {
|
||||||
println 'pluginProjectDir not exists'
|
println 'pluginProjectDir not exists'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
copy {
|
buildApkPluginForAbi(pluginProjectDir, 'armeabi-v7a')
|
||||||
from file('build\\outputs\\apk\\release\\')
|
buildApkPluginForAbi(pluginProjectDir, 'x86')
|
||||||
into new File(pluginProjectDir, 'app\\src\\main\\assets')
|
|
||||||
include "inrt-release-unsigned.apk"
|
|
||||||
rename "inrt-release-unsigned.apk", 'template.apk'
|
|
||||||
}
|
|
||||||
exec {
|
|
||||||
workingDir pluginProjectDir
|
|
||||||
commandLine 'gradlew.bat', 'assembleRelease'
|
|
||||||
}
|
|
||||||
copy {
|
|
||||||
from new File(pluginProjectDir, 'app\\build\\outputs\\apk\\release')
|
|
||||||
into file('..\\common\\release')
|
|
||||||
include '*-release.apk'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"appVersionCode": 460,
|
"appVersionCode": 461,
|
||||||
"appVersionName": "4.1.1 Alpha",
|
"appVersionName": "4.1.1 Alpha2",
|
||||||
"target": 28,
|
"target": 28,
|
||||||
"mini": 17,
|
"mini": 17,
|
||||||
"compile": 28,
|
"compile": 28,
|
||||||
|
|||||||
Reference in New Issue
Block a user