Status Update
Comments
tn...@google.com <tn...@google.com>
do...@dolphy.eu <do...@dolphy.eu> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
xa...@android.com <xa...@android.com> #3
ic...@gmail.com <ic...@gmail.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically ( b/140759491 ).
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
https://android-review.googlesource.com/1288456
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
do...@dolphy.eu <do...@dolphy.eu> #5
It happens when not using manifest merger too.
xa...@android.com <xa...@android.com> #6
We have made a fix to better support setup when libraries share package name.
Note that it will only work if *all* libraries share the same package name. If only some do, then the build will fail.
We will be releasing this shortly.
Note that it will only work if *all* libraries share the same package name. If only some do, then the build will fail.
We will be releasing this shortly.
mc...@gmail.com <mc...@gmail.com> #7
The issue is still there in ADT 21.0.1 (platform tools 16.0.1) when building with Ant.
It is fixed in ADT, though, so Eclipse builds fine.
I attached a ZIP file containing a simple project setup that leads to this error.
It seems that Ant generates another Manifest.java file in the final project which is not the case for ADT.
There is also *another* error when multiple projects define permissions.
For example, in my project setup, if LibA defines
<permission android:name="com.example.adttest.permission.READ_PROVIDER" />
and LibB defines
<permission android:name="com.example.adttest.permission.READ_OTHER_PROVIDER" />
both ADT and Ant will fail to build.
It is fixed in ADT, though, so Eclipse builds fine.
I attached a ZIP file containing a simple project setup that leads to this error.
It seems that Ant generates another Manifest.java file in the final project which is not the case for ADT.
There is also *another* error when multiple projects define permissions.
For example, in my project setup, if LibA defines
<permission android:name="com.example.adttest.permission.READ_PROVIDER" />
and LibB defines
<permission android:name="com.example.adttest.permission.READ_OTHER_PROVIDER" />
both ADT and Ant will fail to build.
xa...@android.com <xa...@android.com> #8
I'll check this, thanks for the project.
re...@gmail.com <re...@gmail.com> #9
[Comment deleted]
re...@gmail.com <re...@gmail.com> #10
Are there any fixes yet? Still have this problem in ADT 21.1.0
ga...@gmail.com <ga...@gmail.com> #11
Still happening with ADT 22 while Gradle works fine.
ja...@gmail.com <ja...@gmail.com> #12
I had a very similar issue. I had to:
1. Make all libraries and projects use different package name in their manifest
2. Delete all bin/ directories
3. Delete all gen/ directories
ALL of these steps were necessary. I had different "Multiple dex files define ..." errors depending on how clean my build environment was.
To be really specific, as long as the multiple classes.jar files contain duplicate items, dex will complain. With step 1-2-3 above I could eliminate all duplicates, all my classes.jar files contain distinct items.
I hope this helps.
1. Make all libraries and projects use different package name in their manifest
2. Delete all bin/ directories
3. Delete all gen/ directories
ALL of these steps were necessary. I had different "Multiple dex files define ..." errors depending on how clean my build environment was.
To be really specific, as long as the multiple classes.jar files contain duplicate items, dex will complain. With step 1-2-3 above I could eliminate all duplicates, all my classes.jar files contain distinct items.
I hope this helps.
ch...@gmail.com <ch...@gmail.com> #13
Thanks -Janos.Gyerik your suggestion worked for me...
ic...@gmail.com <ic...@gmail.com> #14
I still find it strange that permission-distribution to multiple library projects with same package name is not supported. But as this even continues with gradle (and afaik is even enforced more strictly there) it seems the way to go.
Just for reference if you are in need for the old "build-tools" i think they can be found here:http://dl-ssl.google.com/android/repository/platform-tools_r14-linux.zip
Just for reference if you are in need for the old "build-tools" i think they can be found here:
xa...@android.com <xa...@android.com>
jv...@google.com <jv...@google.com> #15
Thank you for reporting this issue. At this time it appears this feedback is no longer relevant with the latest version of Android Studio. If you continue to experience this issue please open a new bug and we can reinvestigate
Description
While with eclipse the build of our multi library project works fine, with ant i get the following error message when running "ant release":
com.android.dx.util.DexException: Multiple dex files define Lcom/my/app/Manifest$permission;
Also see:
OS: Win7
Ant: 1.8.3
STEPS TO REPRODUCE:
1. Create project with multiple libraries and manifests (manifest merger enabled), the Manifest files use the same package name throughout.
2. Build with eclipse -> works
3. Build with ant (tools r20) -> works
4. Build with ant (tolls r21) -> fails
EXPECTED RESULTS:
Also works with ant.
OBSERVED RESULTS:
com.android.dx.util.DexException: Multiple dex files define Lcom/my/app/Manifest$permission;