帖子
帖子
用户
博客
课程
123下一页
返回列表 发新帖
显示全部楼层
4
帖子
0
勋章
49
Y币

[BUG] sunmiT1Printer v1.0.2模块BUG

[复制链接]
发表于 2018-8-1 16:05:26
本帖最后由 宇孤行 于 2018-8-1 16:38 编辑

购买了了sunmiT1Printer v1.0.2模块;但是添加模块后编译就报错;去掉就正常(android环境下);错误如下:

/uzmap/temp/QJ0j2mk1vW2D83s/AStudioProject/app/src/main/res/layout/camera.xml:57: Error: The id "btn_manual" is not defined anywhere. [UnknownId]
                android:layout_above="@+id/btn_manual"
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "UnknownId":
   The @+id/ syntax refers to an existing id, or creates a new one if it has
   not already been defined elsewhere. However, this means that if you have a
   typo in your reference, or if the referred view no longer exists, you do
   not get a warning since the id will be created on demand. This check
   catches errors where you have renamed an id without updating all of the
   references to it.

/uzmap/temp/QJ0j2mk1vW2D83s/AStudioProject/app/src/main/AndroidManifest.xml:34: Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode]
    <application android:allowBackup="false" android:debuggable="false" android:hardwareAccelerated="true" android:icon="@drawable/uz_icon" android:label="@string/app_name" android:largeHeap="true" android:name="com.uzmap.pkg.uzapp.UZApplication" tools:replace="android:icon,android:debuggable,android:allowBackup">
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "HardcodedDebugMode":
   It's best to leave out the android:debuggable attribute from the manifest.
   If you do, then the tools will automatically insert android:debuggable=true
   when building an APK to debug on an emulator or device. And when you
   perform a release build, such as Exporting APK, it will automatically set
   it to false.

   If on the other hand you specify a specific value in the manifest file,
   then the tools will always use it. This can lead to accidentally publishing
   your app with debug information.

2 errors, 0 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/aztec/AztecDetectorResult.class

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
另:该模块文档说需要在"使用升级环境编译"和固件4.0.3这两个条件下编译;经过测试如果不使用"使用升级环境编译"编译;不会报错,但是app运行会提示模块未绑定,无法使用;如果使用"使用升级环境编译"编译;则会就会出现上面的错误


4
帖子
0
勋章
49
Y币
lisifu 发表于 2018-8-20 10:29
我也是这个问题,请问怎么解决的呢?换 FNScanner模块?

心累 ,最终钱是花了, 并没有使用它的,自己写了一个解决问题
175
帖子
1
勋章
5678
Y币
btn_manual这个id你有没有定义呢,你还添加了哪些模块呢
4
帖子
0
勋章
49
Y币
得呤 发表于 2018-8-1 16:12
btn_manual这个id你有没有定义呢,你还添加了哪些模块呢

看我发的说明,在不添加这个购买的模块时候,没有任何问题,编译也正常,app也正常运行;然后添加了这个购买的模块一编译就出现这个错误;所以这个错误肯定是购买的这个模块的问题。
175
帖子
1
勋章
5678
Y币
宇孤行 发表于 2018-8-1 16:27
看我发的说明,在不添加这个购买的模块时候,没有任何问题,编译也正常,app也正常运行;然后添加了这个 ...

安卓还是ios编译失败
4
帖子
0
勋章
49
Y币
得呤 发表于 2018-8-1 16:34
安卓还是ios编译失败

不好意思 忘记说环境了 android
175
帖子
1
勋章
5678
Y币
宇孤行 发表于 2018-8-1 16:37
不好意思 忘记说环境了 android

单独编译是没问题的,看一下你还添加了哪些模块
4
帖子
0
勋章
49
Y币
得呤 发表于 2018-8-1 17:00
单独编译是没问题的,看一下你还添加了哪些模块

这么奇怪(加这个sunmi模块出错,不加不出错;不管在那种编译环境下);我把其他去掉试试看;是不是这个模块跟某一个模块有冲突
4
帖子
0
勋章
49
Y币
本帖最后由 宇孤行 于 2018-8-1 17:22 编辑
宇孤行 发表于 2018-8-1 17:10
这么奇怪(加这个sunmi模块出错,不加不出错;不管在那种编译环境下);我把其他去掉试试看;是不是这个 ...

经过逐一添加自定义模块跟sunmi模块一起编译测试,发现其中一个模块添加后编译就会出现这个错误:
/uzmap/temp/t74S4S7MzJlq876/AStudioProject/app/src/main/AndroidManifest.xml:34: Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode]
    <application android:allowBackup="false" android:debuggable="false" android:hardwareAccelerated="true" android:icon="@drawable/uz_icon" android:label="@string/app_name" android:largeHeap="true" android:name="com.uzmap.pkg.uzapp.UZApplication" tools:replace="android:icon,android:debuggable,android:allowBackup">
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "HardcodedDebugMode":
   It's best to leave out the android:debuggable attribute from the manifest.
   If you do, then the tools will automatically insert android:debuggable=true
   when building an APK to debug on an emulator or device. And when you
   perform a release build, such as Exporting APK, it will automatically set
   it to false.

   If on the other hand you specify a specific value in the manifest file,
   then the tools will always use it. This can lead to accidentally publishing
   your app with debug information.

1 errors, 0 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/os/SystemProperties.class

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
所以应该是这个模块中有跟我自定义模块相同的类名导致(这个怎么排查,心累)
175
帖子
1
勋章
5678
Y币
宇孤行 发表于 2018-8-1 17:21
经过逐一添加自定义模块跟sunmi模块一起编译测试,发现其中一个模块添加后编译就会出现这个错误:
/uzmap/ ...

https://docs.apicloud.com/Module ... ecification-Android
4
帖子
0
勋章
49
Y币
得呤 发表于 2018-8-1 17:52
https://docs.apicloud.com/Module-Dev/Module-audit-specification-Android

经过排查,不是跟我自定义的模块冲突;是跟一个APICloud平台的一个免费模块FNScanner一起使用并在"使用升级环境"条件下编译报错;
123下一页
您需要登录后才可以回帖 登录

本版积分规则