Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

构建安卓apk时错误 #26

Open
Fedsd1 opened this issue Jan 21, 2023 · 32 comments
Open

构建安卓apk时错误 #26

Fedsd1 opened this issue Jan 21, 2023 · 32 comments

Comments

@Fedsd1
Copy link

Fedsd1 commented Jan 21, 2023

/root/sail/android/app/src/main/kotlin/com/sail_tunnel/sail/utils/DeviceStorageApp.kt: Error: Expected Application subtype to implement Configuration.Provider [BadConfigurationProvider from work-runtime-2.7.1]

Explanation for issues of type "BadConfigurationProvider":
An android.app.Application must implement
androidx.work.Configuration.Provider
for on-demand initialization.

Vendor: Android Open Source Project (work-runtime-2.7.1)
Identifier: work-runtime-2.7.1
Feedback: https://issuetracker.google.com/issues/new?component=192731

1 errors, 0 warnings

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:lintVitalRelease'.

Lint found fatal errors while assembling a release target.

Fix the issues identified by lint, or create a baseline to see only new errors:

android {
    lint {
        baseline = file("lint-baseline.xml")
    }
}

For more details, see https://developer.android.com/studio/write/lint#snapshot

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1m 30s
Running Gradle task 'assembleRelease'... 92.2s
Gradle task assembleRelease failed with exit code 1

@depfsh
Copy link

depfsh commented Feb 24, 2023

/root/sail/android/app/src/main/kotlin/com/sail_tunnel/sail/utils/DeviceStorageApp.kt: Error: Expected Application subtype to implement Configuration.Provider [BadConfigurationProvider from work-runtime-2.7.1]

Explanation for issues of type "BadConfigurationProvider": An android.app.Application must implement androidx.work.Configuration.Provider for on-demand initialization.

Vendor: Android Open Source Project (work-runtime-2.7.1) Identifier: work-runtime-2.7.1 Feedback: https://issuetracker.google.com/issues/new?component=192731

1 errors, 0 warnings

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:lintVitalRelease'.

Lint found fatal errors while assembling a release target.

Fix the issues identified by lint, or create a baseline to see only new errors:

android {
    lint {
        baseline = file("lint-baseline.xml")
    }
}

For more details, see https://developer.android.com/studio/write/lint#snapshot

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1m 30s Running Gradle task 'assembleRelease'... 92.2s Gradle task assembleRelease failed with exit code 1

老哥,解决了麽?

@Fedsd1
Copy link
Author

Fedsd1 commented Feb 26, 2023

/root/sail/android/app/src/main/kotlin/com/sail_tunnel/sail/utils/DeviceStorageApp.kt: Error: Expected Application subtype to implement Configuration.Provider [BadConfigurationProvider from work-runtime-2.7.1]
Explanation for issues of type "BadConfigurationProvider": An android.app.Application must implement androidx.work.Configuration.Provider for on-demand initialization.
Vendor: Android Open Source Project (work-runtime-2.7.1) Identifier: work-runtime-2.7.1 Feedback: https://issuetracker.google.com/issues/new?component=192731
1 errors, 0 warnings
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:lintVitalRelease'.

Lint found fatal errors while assembling a release target.

Fix the issues identified by lint, or create a baseline to see only new errors:

android {
    lint {
        baseline = file("lint-baseline.xml")
    }
}

For more details, see https://developer.android.com/studio/write/lint#snapshot

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1m 30s Running Gradle task 'assembleRelease'... 92.2s Gradle task assembleRelease failed with exit code 1

老哥,解决了麽?

并没有

@mumujie10
Copy link

/root/sail/android/app/src/main/kotlin/com/sail_tunnel/sail/utils/DeviceStorageApp.kt:错误:预期应用程序子类型实现 Configuration.Provider [来自 work-runtime-2.7.1 的 BadConfigurationProvider]

“BadConfigurationProvider”类型问题的解释: android.app.Application 必须实现 androidx.work.Configuration.Provider 以进行按需初始化。

供应商:Android 开源项目 (work-runtime-2.7.1) 标识符:work-runtime-2.7.1 反馈:https://issuetracker.google.com/issues/new? component=192731

1 个错误,0 个警告

失败:构建失败,出现异常。

  • 出了什么问题:
    任务 ':app:lintVitalRelease' 执行失败。

Lint 在组装发布目标时发现了致命错误。

修复 lint 识别的问题,或创建基线以仅查看新错误:

android {
    lint {
        baseline = file("lint-baseline.xml")
    }
}

有关详细信息,请参阅https://developer.android.com/studio/write/lint#snapshot

  • 尝试:

使用 --stacktrace 选项运行以获取堆栈跟踪。
使用 --info 或 --debug 选项运行以获得更多日志输出。
使用 --scan 运行以获得完整的见解。

BUILD FAILED in 1m 30s Running Gradle task 'assembleRelease'... 92.2s Gradle 任务 assembleRelease 失败,退出代码为 1

我安卓可以运行,但订阅和节点都为空!

@depfsh
Copy link

depfsh commented Mar 3, 2023

@mumujie10 你是自己编译的apk ? 还是用的现成的?

@mumujie10
Copy link

@mumujie10你是自己编的apk吗?还是用的现在的?

我拉完git 使用flutter build apk构建了,然后改了url

@depfsh
Copy link

depfsh commented Mar 3, 2023

@mumujie10你是自己编的apk吗?还是用的现在的?

我拉完git 使用flutter build apk构建了,然后改了url

老哥,麻烦说说你的编译环境,我的死活不成功呢,报错。
Flutter版本?JDK版本?

@depfsh
Copy link

depfsh commented Mar 3, 2023

我看作者的CI 后面都是一直构建失败了

@mumujie10
Copy link

我看作者的CI后面都是直接构建失败了

我这个flutter版本也是有问题的,我现在也在找合适的版本

@depfsh
Copy link

depfsh commented Mar 3, 2023

我看作者的CI后面都是直接构建失败了

我这个flutter版本也是有问题的,我现在也在找合适的版本

我以为你构建成功了呢?

@Fedsd1
Copy link
Author

Fedsd1 commented Mar 5, 2023

我看作者的CI后面都是直接构建失败了

我这个flutter版本也是有问题的,我现在也在找合适的版本

我以为你构建成功了呢?

没成功,成功了麻烦告诉下解决方法,非常感谢

@Fedsd1
Copy link
Author

Fedsd1 commented Mar 5, 2023

我看作者的CI后面都是直接构建失败了

我这个flutter版本也是有问题的,我现在也在找合适的版本

没成功,成功了麻烦告诉下解决方法,非常感谢

@muzaffer72
Copy link

Hi my workflow is working for apk build. You can use. But i cant fixed list servers

https://github.com/muzaffer72/onvao.net.vpn/tree/master/.github%2Fworkflows

@depfsh
Copy link

depfsh commented Mar 6, 2023

Hi my workflow is working for apk build. You can use. But i cant fixed list servers

https://github.com/muzaffer72/onvao.net.vpn/tree/master/.github%2Fworkflows

Hi my workflow is working for apk build. You can use. But i cant fixed list servers

https://github.com/muzaffer72/onvao.net.vpn/tree/master/.github%2Fworkflows

Thanks @muzaffer72 , but I saw all your workflow were failed.
can you fix your workflow ?

@muzaffer72
Copy link

Hi my workflow is working for apk build. You can use. But i cant fixed list servers
https://github.com/muzaffer72/onvao.net.vpn/tree/master/.github%2Fworkflows

Hi my workflow is working for apk build. You can use. But i cant fixed list servers
https://github.com/muzaffer72/onvao.net.vpn/tree/master/.github%2Fworkflows

Thanks @muzaffer72 , but I saw all your workflow were failed. can you fix your workflow ?

resim

@spiky-star
Copy link

可以构建成功吧,serverlist也可以

@Fedsd1
Copy link
Author

Fedsd1 commented Apr 6, 2023

可以构建成功吧,serverlist也可以

请问一下环境是什么,能否帮我打包一个看看 api地址 1air.xyz

@A-W-C-J

This comment was marked as off-topic.

@spiky-star
Copy link

可以构建成功吧,serverlist也可以

请问一下环境是什么,能否帮我打包一个看看 api地址 1air.xyz
试试
https://spark.appc02.com/wnca

@spiky-star
Copy link

spiky-star commented Apr 10, 2023

我这么改了下可以打包

lint {
        baseline = file("lint-baseline.xml")
    }

    compileSdkVersion 32

@Fedsd1
Copy link
Author

Fedsd1 commented Apr 10, 2023

可以构建成功吧,serverlist也可以

请问一下环境是什么,能否帮我打包一个看看 api地址 1air.xyz
试试
https://spark.appc02.com/wnca

能登上但是不显示节点,感谢大佬帮忙,我再自己研究下

@Fedsd1
Copy link
Author

Fedsd1 commented Apr 10, 2023

我这么改了下可以打包

lint {
        baseline = file("lint-baseline.xml")
    }

    compileSdkVersion 32

我去试试

@shunjianboy
Copy link

shunjianboy commented Apr 12, 2023

@RDReindeer 成功了吗?

@Fedsd1
Copy link
Author

Fedsd1 commented Apr 13, 2023

@RDReindeer 成功了吗?

并没有,可以加下tg一起探讨一下t.me/jametime

@linaaaqi
Copy link
Collaborator

这个包iOS版本的断开连接特别慢,大家怎么解决的?

#21

@spiky-star
Copy link

android 作者还没改好,VpnManager里的getStatus()方法改下,就可以运行了

Future<VpnStatus> getStatus() async {
    // Native channel
    const platform = MethodChannel("com.prosfinityx.ang/vpn_manager");

    if (!Platform.isIOS) {
      bool? result = await platform.invokeMethod("getStatus");
      return (result ?? false) ? VpnStatus.connected : VpnStatus.disconnected;
    }
    int result;
    try {
      result = await platform.invokeMethod("getStatus");
    } on PlatformException catch (e) {
      print(e.toString());

      rethrow;
    }
    return VpnStatus.values.firstWhere((e) => e.code == result);
  }

@muzaffer72
Copy link

add build gradle in

android { ...
lintOptions {
checkReleaseBuilds false
}

}

after change Target Sdk version in build gradle line 56

targetSdkVersion 32

@spiky-star
Copy link

我无法断开连接是怎么回事

@nicolastinkl
Copy link

Platform.isIOS

thanks:
see link: https://stackoverflow.com/questions/45924474/how-do-you-detect-the-host-platform-from-dart-code
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;

enum Os {
web,
android,
ios,
macOS,
linux,
windows,
fuchsia,
}

class Platform {
const Platform();

/// Platform is Web.
static bool get isWeb => os == Os.web;

/// Platform is Android.
static bool get isAndroid => os == Os.android;

/// Platform is IOS.
static bool get isIOS => os == Os.ios;

/// Platform is Fuchsia.
static bool get isFuchsia => os == Os.fuchsia;

/// Platform is Linux.
static bool get isLinux => os == Os.linux;

/// Platform is MacOS.
static bool get isMacOS => os == Os.macOS;

/// Platform is Windows.
static bool get isWindows => os == Os.windows;

/// Platform is Android or IOS.
static bool get isMobile => isAndroid || isIOS;

/// Platform is Android or IOS or Fuchsia.
static bool get isFullMobile => isMobile || isFuchsia;

/// Platform is Linux or Windows or MacOS.
static bool get isDesktop => isLinux || isWindows || isMacOS;

/// Getting the os name.
static Os get os {
if (kIsWeb) {
return Os.web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return Os.android;
case TargetPlatform.iOS:
return Os.ios;
case TargetPlatform.macOS:
return Os.macOS;
case TargetPlatform.windows:
return Os.windows;
case TargetPlatform.fuchsia:
return Os.fuchsia;
case TargetPlatform.linux:
return Os.linux;
}
}
}

@onjacky
Copy link

onjacky commented May 22, 2023 via email

@fantasydove
Copy link

可以构建成功吧,serverlist也可以

请问一下环境是什么,能否帮我打包一个看看 api地址 1air.xyz
试试
https://spark.appc02.com/wnca

能登上但是不显示节点,感谢大佬帮忙,我再自己研究下

节点不显示解决了么

@C007G
Copy link

C007G commented Nov 21, 2023

我无法断开连接是怎么回事

确实无法断开

@onjacky
Copy link

onjacky commented Nov 21, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests