Android Build Problems


#1

I successfully compiled the ndk-part of my project, but when trying to build the java-part in Eclipse (Ubunutu) i got these error, any ideas how to fix them?

 

error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').    AndroidManifest.xml    /myDroid    line 9    Android AAPT Problem

 

I already defind a icon in introjucer??

 

Unable to resolve target 'android-8'    myDroid        Unknown    Android Target Problem
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project    myDroid       Unknown    Java Problem
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files    myDroid.java    /myDroid/src/com/yourcompany/myDroid    line 1    Java Problem

 


#2

 

are you sure we set the icon. You get that error when it hasnt been provided. Try taking out android:icon="...." from AndroidManifest.xml

 

 


#3

thanks, just reinstalled the ADT, now it works :)


#4

Hours of tinkering and I am still stuck,  The problem seems to be that in dirent.h on the NDK, that DIR is not set to something the juce_linux_CommonFile.cpp can compile.  It is "typdef struct DIR DIR;" which seem ambiguous and the calls to opendir also complain of being defined in another scope.  There might be a namespace problem.  I am running juce tip (3.0+) on a mac OSx 10.7 have latest Android SDK and NDK loaded with eclipse and ADT.  Building other projects fine not Juce related. This is Introjucer created project and compiles on iOS and Windows VS2012 fine.  I am using NDK version 14 and SDK 4.0

Here is the error:
 

/Users/shannon/Development/android-ndk-r9b/ndk-build all 

[armeabi] Compile++ arm  : juce_jni <= juce_core.cpp

In file included from jni/../../../../../thirdparty/juce/modules/juce_core/juce_core.cpp:210:0:

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:136:5: error: 'DIR' does not name a type

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp: In constructor 'juce::DirectoryIterator::NativeIterator::Pimpl::Pimpl(const juce::File&, const juce::String&)':

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:89:26: error: class 'juce::DirectoryIterator::NativeIterator::Pimpl' does not have any field named 'dir'

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:89:77: error: 'opendir' was not declared in this scope

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp: In destructor 'juce::DirectoryIterator::NativeIterator::Pimpl::~Pimpl()':

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:95:13: error: 'dir' was not declared in this scope

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:96:26: error: 'closedir' was not declared in this scope

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp: In member function 'bool juce::DirectoryIterator::NativeIterator::Pimpl::next(juce::String&, bool*, bool*, juce::int64*, juce::Time*, juce::Time*, bool*)':

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:103:13: error: 'dir' was not declared in this scope

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:109:55: error: 'readdir' was not declared in this scope

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:117:46: error: invalid use of incomplete type 'struct juce::DirectoryIterator::NativeIterator::Pimpl::next(juce::String&, bool*, bool*, juce::int64*, juce::Time*, juce::Time*, bool*)::dirent'

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:109:24: error: forward declaration of 'struct juce::DirectoryIterator::NativeIterator::Pimpl::next(juce::String&, bool*, bool*, juce::int64*, juce::Time*, juce::Time*, bool*)::dirent'

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:119:57: error: invalid use of incomplete type 'struct juce::DirectoryIterator::NativeIterator::Pimpl::next(juce::String&, bool*, bool*, juce::int64*, juce::Time*, juce::Time*, bool*)::dirent'

jni/../../../../../thirdparty/juce/modules/juce_core/native/juce_linux_CommonFile.cpp:109:24: error: forward declaration of 'struct juce::DirectoryIterator::NativeIterator::Pimpl::next(juce::String&, bool*, bool*, juce::int64*, juce::Time*, juce::Time*, bool*)::dirent'

make: *** [obj/local/armeabi/objs/juce_jni/__/__/__/__/__/thirdparty/juce/modules/juce_core/juce_core.o] Error 1


Any ideas on how to fix this greatly appreciated,

Thanks, Shannon


#5

It all compiles fine for me!

And that's a strange error, because DIR and readdir are declared in <dirent.h>, which is a totally standard system header that's definitely included before the code that's causing you problems.

Does the juce demo project compile for android?