Fixed
Status Update
Comments
tn...@google.com <tn...@google.com>
xa...@android.com <xa...@android.com> #2
There is indeed a problem when build with ADT and libraries. The libraries aren't properly recompiled in release mode (the app code is though).
This is working fine in Ant where both the libraries and the app are compiled in release mode.
While I look for a fix, you could use Ant to just build your release app.
This is working fine in Ant where both the libraries and the app are compiled in release mode.
While I look for a fix, you could use Ant to just build your release app.
xa...@android.com <xa...@android.com>
gy...@gmail.com <gy...@gmail.com> #3
I'm seeing the same thing. I have a main project and a library project. The main project, when exported signed, remains as BuildConfig.DEBUG = true.
xa...@android.com <xa...@android.com> #4
well that's strange. Do you have auto-refresh and or auto-build on?
ch...@gmail.com <ch...@gmail.com> #5
I have "Build Automatically" on and experience the issue in my main project.
gy...@gmail.com <gy...@gmail.com> #6
Xavier, I have both auto-refresh (Prefs > Android > Build) and auto-build (Project > Build Automatically) on.
xa...@android.com <xa...@android.com> #7
I can't reproduce the main project not being recompiled but I pushed a fix in ADT 18 that fixes the library not being recompiled. Can you try it?
al...@gmail.com <al...@gmail.com> #8
Now I can't reproduce this bug on test project I've submitted, but in my real application BuildConfig.DEBUG = true after exporting signed application package. I suppose Eclipse just doesn't start android pre-compiler task if "Project > Build Automatically" is on.
I'll try to create another sample project.
I'll try to create another sample project.
se...@gmail.com <se...@gmail.com> #9
BuildConfig.DEBUG works in my newly created sample project but it doesnt work in my older project. I have already tried to fix project properties, clean etc. Without success. Using ADT 18.
se...@gmail.com <se...@gmail.com> #10
[Comment deleted]
ho...@gmail.com <ho...@gmail.com> #11
can I go back to the ADT 16 ...ORMlite.jar dont works with this ADT 18 :'(((
je...@gmail.com <je...@gmail.com> #12
I'm having the same problem, however I haven't found a way to reproduce this consistently.
se...@gmail.com <se...@gmail.com> #13
I have the same problem with ADT r18.
My app project references library project. BuildConfig.DEBUG is always true after export. Auto refresh and Build Automatically are both enabled.
My app project references library project. BuildConfig.DEBUG is always true after export. Auto refresh and Build Automatically are both enabled.
zj...@gmail.com <zj...@gmail.com> #14
Host OS: Microsoft Windows 7 32-bit SP1
SDK tools version: R19
Eclipse version: Indigo Service Release 1
ADT plug-in version: 18
run this project
04-26 14:17:15.815: E/AndroidRuntime(1995): java.lang.NoClassDefFoundError: org.achartengine.model.XYMultipleSeriesDataset
it seems the lib dosn't compiler in!
SDK tools version: R19
Eclipse version: Indigo Service Release 1
ADT plug-in version: 18
run this project
04-26 14:17:15.815: E/AndroidRuntime(1995): java.lang.NoClassDefFoundError: org.achartengine.model.XYMultipleSeriesDataset
it seems the lib dosn't compiler in!
th...@gmail.com <th...@gmail.com> #15
Same issue. ADT 18. Eclipse Indigo. I have a library project being referenced by a normal application project. Auto refresh and Build Automatically are enabled.
*Both* BuildConfig.DEBUG in the library project and in the application project export as true in a signed apk.
*Both* BuildConfig.DEBUG in the library project and in the application project export as true in a signed apk.
xi...@gmail.com <xi...@gmail.com> #16
run this project
04-26 14:17:15.815: E/AndroidRuntime(1995): java.lang.NoClassDefFoundError: org.achartengine.model.XYMultipleSeriesDataset
it seems the lib dosn't compiler in!
Rename the libraries folder from “lib” to “libs”,can fix it
04-26 14:17:15.815: E/AndroidRuntime(1995): java.lang.NoClassDefFoundError: org.achartengine.model.XYMultipleSeriesDataset
it seems the lib dosn't compiler in!
Rename the libraries folder from “lib” to “libs”,can fix it
th...@gmail.com <th...@gmail.com> #17
I forgot to add some info:
I also ran ProGuard in my scenario in comment #18 . I looked at the generated usage.txt and noticed that proguard removed the BuildConfig class from my application project, *but* left the one in the library project. It seems that ProGuard inlined the "true" value for all occurrences of BuildConfig.DEBUG in my Application project classes.
Hopefully that might shed some light into what's going on. I was using the ProGuard settings from SDK Tools r19, all run through Eclipse.
I also ran ProGuard in my scenario in
Hopefully that might shed some light into what's going on. I was using the ProGuard settings from SDK Tools r19, all run through Eclipse.
zj...@gmail.com <zj...@gmail.com> #18
that really solves the problem, but I don't konw why!
xa...@android.com <xa...@android.com> #19
Proguard shouldn't be needed there as javac should remove dead code by itself (if (false) { ....})
However it is possible that proguard does remove the class if it detects that nothing references (and since it only contains a boolean that's inlined everywhere due to being static final, nothing should be referencing the class after javac)
In every test I've tried the projects (and libraries) are properly recompiled before export but I'll try again.
However it is possible that proguard does remove the class if it detects that nothing references (and since it only contains a boolean that's inlined everywhere due to being static final, nothing should be referencing the class after javac)
In every test I've tried the projects (and libraries) are properly recompiled before export but I'll try again.
th...@gmail.com <th...@gmail.com> #20
[Comment deleted]
go...@gmail.com <go...@gmail.com> #21
This is not yet fixed in ADT18. Can someone clarify if this is really fixed?
tu...@googlemail.com <tu...@googlemail.com> #22
I have the same issues using ADT18 since I'm referencing a Library Project. The normal build and run cycle in development mode works like a charm, but when I export my project it throws an error like this:
E/AndroidRuntime(15512): FATAL EXCEPTION: main
E/AndroidRuntime(15512): java.lang.RuntimeException: Unable to instantiate application com.googlemail.tuffnerdstuff.qwipple.QwippleApplication: java.lang.ClassNotFoundException: com.googlemail.tuffnerdstuff.qwipple.QwippleApplication in loader dalvik.system.PathClassLoader[/data/app/com.googlemail.tuffnerdstuff.qwipple-1.apk]
I use the following workaround:
1. Disable "Project > Build Automatically"
2. Project > Clean
3. Project > Build All
4. Export Project
E/AndroidRuntime(15512): FATAL EXCEPTION: main
E/AndroidRuntime(15512): java.lang.RuntimeException: Unable to instantiate application com.googlemail.tuffnerdstuff.qwipple.QwippleApplication: java.lang.ClassNotFoundException: com.googlemail.tuffnerdstuff.qwipple.QwippleApplication in loader dalvik.system.PathClassLoader[/data/app/com.googlemail.tuffnerdstuff.qwipple-1.apk]
I use the following workaround:
1. Disable "Project > Build Automatically"
2. Project > Clean
3. Project > Build All
4. Export Project
[Deleted User] <[Deleted User]> #23
still not fixed in r20
[Deleted User] <[Deleted User]> #24
Have the same problem in r20. Suggested workarounds do not work. Please fix.
From the number of pretty severe bugs I've encountered in the SDK, it looks like the team has lost track of inter-dependencies of different parts of the build process.
From the number of pretty severe bugs I've encountered in the SDK, it looks like the team has lost track of inter-dependencies of different parts of the build process.
jo...@gmail.com <jo...@gmail.com> #25
The solution for me:
Project -> Build Automatically
Project -> Clean
Project -> Build Project
Export Android application
It's work in r20
Project -> Build Automatically
Project -> Clean
Project -> Build Project
Export Android application
It's work in r20
[Deleted User] <[Deleted User]> #26
It is not really fixed in r20, we still need to disable build automatically in order to make it work.
st...@gmail.com <st...@gmail.com> #27
Confirm with r20.0.1: bug still appears in auto build, OK with auto-build deactivated, clean and export.
al...@gmail.com <al...@gmail.com> #28
Can reproduce bug in the simplest case: one activity, two layouts.
ADT version: 20.0.2.v201207191942-407447
Other components are the same as in the first comment. "Build Automatically" is on
ADT version: 20.0.2.v201207191942-407447
Other components are the same as in the first comment. "Build Automatically" is on
da...@gmail.com <da...@gmail.com> #29
[Comment deleted]
da...@gmail.com <da...@gmail.com> #30
I have the same problem for sdk tools 20.0.1 ; sdk platform-tools 14; build automatically on or off - doesn't matter
eclipse 3.7.2, windows7 enterprise, sp1
eclipse 3.7.2, windows7 enterprise, sp1
ad...@fame-it.net <ad...@fame-it.net> #31
Still having similar issue 36903768 .0.3
ca...@gmail.com <ca...@gmail.com> #32
Having the same issues on sdk tools 20.0.1
to...@malcolmson.ca <to...@malcolmson.ca> #33
Same problem (I think) here with Juno and r21 preview 2, on Windows 7 32bit.
I tried suggestion above: turn off 'build auto', then did clean all, and then export.
Found that DEBUG=true in libraries AND main project. Determined this by inspection in Eclipse, and by behavior of exported APK.
The size of my APK suggests that it really is RELEASE - so I assume this bug is just that DEBUG flag doesn't work?
I tried suggestion above: turn off 'build auto', then did clean all, and then export.
Found that DEBUG=true in libraries AND main project. Determined this by inspection in Eclipse, and by behavior of exported APK.
The size of my APK suggests that it really is RELEASE - so I assume this bug is just that DEBUG flag doesn't work?
ma...@gmail.com <ma...@gmail.com> #34
[Comment deleted]
ma...@gmail.com <ma...@gmail.com> #35
Seeing this on sdk 20.0.3, with a project using ABS and gridlayout, both on Eclipse Juno and ant, on Mac OS X 10.8.
di...@gmail.com <di...@gmail.com> #36
So the only reliable solution that I've found is to define my own constant class, as follows:
class AppConfig {
public static final boolean DEBUG = false;
}
And wrap all code like this:
import static ... .DEBUG
if (DEBUG) {
Log.d(...);
}
A little bit more work than BuildConfig.DEBUG, but at least I can trust that if I set it to false, my debug code really will be turned off. The ADT tools are not trustworthy to the same degree.
class AppConfig {
public static final boolean DEBUG = false;
}
And wrap all code like this:
import static ... .DEBUG
if (DEBUG) {
Log.d(...);
}
A little bit more work than BuildConfig.DEBUG, but at least I can trust that if I set it to false, my debug code really will be turned off. The ADT tools are not trustworthy to the same degree.
aa...@gmail.com <aa...@gmail.com> #37
Issue still persists as of 20.0.3. Turning off Build Automatically and cleaning -> exporting once again solved the problem.
tg...@gmail.com <tg...@gmail.com> #38
Disabled "Build automatically", Clean all, exported signed app.
BuildConfig.DEBUG is still "true"
BuildConfig.DEBUG is still "true"
ap...@googlemail.com <ap...@googlemail.com> #39
Guys! This is a serious issue. Are you going to do anything about it?
he...@gmail.com <he...@gmail.com> #40
I believe the solution is the new Android build system, which isn't quite done - but you can check out here, and use:
http://tools.android.com/tech-docs/new-build-system
to...@malcolmson.ca <to...@malcolmson.ca> #41
Switching to a system that is still in alpha can't be the solution to bugs in the current system. We want less bugs not more.
gi...@gmail.com <gi...@gmail.com> #42
This bug is already fixed in the last ADT. At least I don't have this problem
th...@googlemail.com <th...@googlemail.com> #43
Just installed Eclipse and SDK in a fresh download and have exact this issue.
No way to get around up to now.
Microsoft Windows XP [Version 5.1.2600]
Eclipse for Mobile Developers
Version: Juno Service Release 1
Build id: 20121004-1855
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
SDK Manager r21.1
Any idea?
No way to get around up to now.
Microsoft Windows XP [Version 5.1.2600]
Eclipse for Mobile Developers
Version: Juno Service Release 1
Build id: 20121004-1855
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
SDK Manager r21.1
Any idea?
yu...@gmail.com <yu...@gmail.com> #44
if you have "Build Automatically" set to *true* it will never work
you need to disable "Build Automatically" or you will not be able to produce a build with debug = false in the library project
you need to disable "Build Automatically" or you will not be able to produce a build with debug = false in the library project
th...@googlemail.com <th...@googlemail.com> #45
[Comment deleted]
th...@googlemail.com <th...@googlemail.com> #46
"Build Automatically" is disabled.
I have run through all the clean steps, provided in several comments on both threads.
For the moment I have found the only solution to create a own class, where the flag is overwritten with a "false".
I found this on another blog, where the user went nearly mad on this bug until he wrote this:
public class appConfig {
public static final boolean DEBUG = false;
}
I have run through all the clean steps, provided in several comments on both threads.
For the moment I have found the only solution to create a own class, where the flag is overwritten with a "false".
I found this on another blog, where the user went nearly mad on this bug until he wrote this:
public class appConfig {
public static final boolean DEBUG = false;
}
fe...@gmail.com <fe...@gmail.com> #47
This still happens, even though the issue is marked as Closed.
da...@gmail.com <da...@gmail.com> #48
This still happens, in 22.0.1 SDK Tools, and why is marked closed ?
ma...@gmail.com <ma...@gmail.com> #49
This is not fixed. Please re-open.
fo...@mcdull.us <fo...@mcdull.us> #50
Not sure if it the issue as this one.
It is happening in one of the projects I'm working on after updated to v22.
It keeps building all the time.
It is happening in one of the projects I'm working on after updated to v22.
It keeps building all the time.
zh...@gmail.com <zh...@gmail.com> #51
Yes, I spent a lot of time because of this bug in adt v22.
[Deleted User] <[Deleted User]> #52
This issue is still happening. It happened to me just now!
Please, reopen.
Please, reopen.
rl...@gmail.com <rl...@gmail.com> #53
Hi, I have the same error with the latest SDK/ADT, what´s going on? Any solution for this?
da...@gmail.com <da...@gmail.com> #54
In my case this bug appeared with the addition of many libraries (For me 9 libraries with 5 Android Project Library)
For information, to avoid this bug I process this way:
Step 1: Cleaning of all the libraries and Eclipse project application with the "build automatically" enabled.
Step 2: Disable the option "build automatically"
Step 3: Clean the Eclipse project application ONLY (Not libraries)
Step 4: Launch the export of the application with Android APK tools
and it should work.
For information, to avoid this bug I process this way:
Step 1: Cleaning of all the libraries and Eclipse project application with the "build automatically" enabled.
Step 2: Disable the option "build automatically"
Step 3: Clean the Eclipse project application ONLY (Not libraries)
Step 4: Launch the export of the application with Android APK tools
and it should work.
rl...@gmail.com <rl...@gmail.com> #55
Danien, thank you. But I did this steps as you described and id did not work. After export I got this error.
"Failed to export application Command-line Error -1073741819".
There is no error messages in the console, so I don´t have any idea why the app is not exporting. This never happened before.
"Failed to export application Command-line Error -1073741819".
There is no error messages in the console, so I don´t have any idea why the app is not exporting. This never happened before.
ee...@gmail.com <ee...@gmail.com> #56
Issue still persists in ADT v22.2.1 in a project with multiple lib-project dependencies.
Workaround in comment #58 works for me.
Workaround in
ni...@gmail.com <ni...@gmail.com> #57
I was facing the same issue as everytime I was running the project as android application it used to open in debugger mode but then the problem was solved.
-If you are working in eclipse you must be using Java EE perspective
-Instead just select Java perspective.
Clean your app.
uninstall the app from the device.
Restart your device (Just like that so that no cache is stored)
Run your app.
The debugger mode won't show up this time. Copy the apk generated in your bin folder and try it out on other devices as well
-If you are working in eclipse you must be using Java EE perspective
-Instead just select Java perspective.
Clean your app.
uninstall the app from the device.
Restart your device (Just like that so that no cache is stored)
Run your app.
The debugger mode won't show up this time. Copy the apk generated in your bin folder and try it out on other devices as well
mi...@gmail.com <mi...@gmail.com> #58
it would seem this is still a bug in the android tools export capability whereby it does not do the right thing at export time if the project out of which the .apk is exported had been previously built via "Build Automatically".
To confirm … the fix noted in #58 (and re-inforced as noted in #60) does solve the problem if the steps are followed carefully.
But it would be nice to see the android export tool re-build the final project so that the BuildConfig.DEBUG value is set properly.
To confirm … the fix noted in #58 (and re-inforced as noted in #60) does solve the problem if the steps are followed carefully.
But it would be nice to see the android export tool re-build the final project so that the BuildConfig.DEBUG value is set properly.
um...@gmail.com <um...@gmail.com> #59
#28 works for me on ADT 23.0.2. I didn't need to treat project and libraries differently as mentioned in #58.
ra...@gmail.com <ra...@gmail.com> #60
[Comment deleted]
he...@gmail.com <he...@gmail.com> #61
I've just upgraded to Eclipse Luna, and noticed this issue with the first APK i exported. With Eclipse Indigo this could happen, but very rarely.
Sure i can use create my own BuildConfig class and use that instead. But that won't work for the third-party library projects it relies on.
This has to be fixed now!
Sure i can use create my own BuildConfig class and use that instead. But that won't work for the third-party library projects it relies on.
This has to be fixed now!
Description
Host OS: Microsoft Windows 7 64-bit SP1
SDK tools version: R17
Eclipse version: Indigo Service Release 2
ADT plug-in version: 17.0.0.v201203161636-291853
Platform targeted by your project: any
Version of the platform running in the emulator: any
STEPS TO REPRODUCE:
1. Check "Project->Build Automatically"
2. Create empty android library
3. Create empty android project referencing our library
4. Add logging for BuildConfig.DEBUG
5. Export signed android project
6. Run app
EXPECTED RESULTS:
BuildConfig.DEBUG = false
OBSERVED RESULTS:
BuildConfig.DEBUG = true
ADDITIONAL INFORMATION:
Sample projects are attached
Sometimes it's quite hard to reproduce this bug. But usually BuildConfig.DEBUG = true for first exported project.