infinitered / bluepotion

Like RedPotion, but for Android
MIT License
74 stars 18 forks source link

rake newclear issues #28

Closed KCErb closed 9 years ago

KCErb commented 9 years ago

Now that bluepotion create is working I tried rake newclear

and everything went along smoothly. All compiles were fine and it started creating until it crashed:

   Compile ./app/screens/home_screen.rb
    Create ./build/Development-16/lib/armeabi/libpayload.so
    Create ./build/Development-16/lib/armeabi/gdbserver
    Create ./build/Development-16/lib/armeabi/gdb.setup
./build/Development-16/java/com/your_company/myapp/Request.java:4: cannot find symbol
symbol: class Com_Android_Volley_Toolbox_StringRequest
public class Request extends Com_Android_Volley_Toolbox_StringRequest {
                             ^
warning: com/rubymotion/String.class(com/rubymotion:String.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
./build/Development-16/java/com/your_company/myapp/Request.java:49: package com.android.volley does not exist
        protected java.util.Map<java.lang.String,java.lang.String> getParams() throws com.android.volley.AuthFailureError {
                                                                                                        ^
./build/Development-16/java/com/your_company/myapp/Request.java:54: package com.android.volley does not exist
        public java.util.Map<java.lang.String,java.lang.String> getHeaders() throws com.android.volley.AuthFailureError {
                                                                                                      ^
./build/Development-16/java/com/your_company/myapp/Request.java:48: method does not override or implement a method from a supertype
        @Override
        ^
./build/Development-16/java/com/your_company/myapp/Request.java:53: method does not override or implement a method from a supertype
        @Override
        ^
5 errors
1 warning
rake aborted!
Command failed with status (1): [/usr/bin/javac -d "./build/Development-16/...]
/Library/RubyMotion/lib/motion/project/template/android.rb:526:in `block (2 levels) in <top (required)>'
/Library/RubyMotion/lib/motion/project/paralel_builder.rb:47:in `call'
/Library/RubyMotion/lib/motion/project/paralel_builder.rb:47:in `block (2 levels) in initialize'
Tasks: TOP => build
(See full trace by running task with --trace)

I've been having that compiler upgrade for a while so I decided to try to fix it before reporting. I was able to get rid of the compiler warning by upgrading to the latest jdk7 (I first did jdk8 but was overwhelmed by the warnings), but the error stands starting with this error:

./build/Development-16/java/com/your_company/myapp/Request.java:4: error: cannot find symbol
public class Request extends Com_Android_Volley_Toolbox_StringRequest {
                             ^
  symbol: class Com_Android_Volley_Toolbox_StringRequest

I'm happy to alpha test BluePotion, let me know if there's anything I can do :)

twerth commented 9 years ago

It's a bear to get the java stuff setup right. Let's start out with what I have, @GantMan what do you have?

> java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

> javac -version
javac 1.6.0_65

In .bash_profile:

export RUBYMOTION_ANDROID_SDK=/Users/stamen/.rubymotion-android/sdk
export RUBYMOTION_ANDROID_NDK=/Users/stamen/.rubymotion-android/ndk

Did you use motion android-setup ?

I have SDK version 15, 16, 18, and 22 installed. In app I'm currently working on I'm using 16

darinwilson commented 9 years ago

I'm looking at this now - the problem is the Gradle setup. With the addition of app.net we need to add motion-gradle and update the Rakefile

darinwilson commented 9 years ago

Also @KCErb : the RubyMotion docs say that 1.7 might work but they recommend 1.6. I've been using 1.7 without any problems. You do get the compiler warnings with the older versions, but they seem to be innocuous - I've been looking at them for months :)

KCErb commented 9 years ago

Just tried from master:

KC:myapp$ bundle
Fetching git://github.com/infinitered/bluepotion.git
Fetching gem metadata from https://rubygems.org/...
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using bluepotion 0.1.2 from git://github.com/infinitered/bluepotion.git (at master)
Using motion-gradle 1.3.0
Using reset-sim 1.0
Using newclear 1.2
Using bundler 1.9.1
Bundle complete! 4 Gemfile dependencies, 6 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

but I'm getting the same error on newclear

./build/Development-16/java/com/your_company/myapp/Request.java:4: error: cannot find symbol
public class Request extends Com_Android_Volley_Toolbox_StringRequest {
                             ^
  symbol: class Com_Android_Volley_Toolbox_StringRequest
./build/Development-16/java/com/your_company/myapp/Request.java:49: error: package com.android.volley does not exist
        protected java.util.Map<java.lang.String,java.lang.String> getParams() throws com.android.volley.AuthFailureError {
                                                                                                        ^
./build/Development-16/java/com/your_company/myapp/Request.java:54: error: package com.android.volley does not exist
        public java.util.Map<java.lang.String,java.lang.String> getHeaders() throws com.android.volley.AuthFailureError {
                                                                                                      ^
./build/Development-16/java/com/your_company/myapp/Request.java:48: error: method does not override or implement a method from a supertype
        @Override
        ^
3 warnings
./build/Development-16/java/com/your_company/myapp/Request.java:53: error: method does not override or implement a method from a supertype
        @Override
        ^

My java and javac:

KC:myapp$ java -version
java version "1.8.0_60-ea"
Java(TM) SE Runtime Environment (build 1.8.0_60-ea-b19)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b19, mixed mode)
KC:myapp$ javac -version
javac 1.8.0_60-ea

I'll try downgrading back to jdk6, but I don't think that's the issue, because my non-bluepotion apps are still fine.

darinwilson commented 9 years ago

Can you post the full output of newclear? It looks like it's not doing the Gradle install, which I thought it did.

On Fri, Jun 19, 2015, 11:57 AM KC Erb notifications@github.com wrote:

Just tried from master:

KC:myapp$ bundle Fetching git://github.com/infinitered/bluepotion.git Fetching gem metadata from https://rubygems.org/... Fetching version metadata from https://rubygems.org/.. Resolving dependencies... Using rake 10.4.2 Using bluepotion 0.1.2 from git://github.com/infinitered/bluepotion.git (at master) Using motion-gradle 1.3.0 Using reset-sim 1.0 Using newclear 1.2 Using bundler 1.9.1 Bundle complete! 4 Gemfile dependencies, 6 gems now installed. Use bundle show [gemname] to see where a bundled gem is installed.

but I'm getting the same error on newclear

./build/Development-16/java/com/your_company/myapp/Request.java:4: error: cannot find symbol public class Request extends Com_Android_Volley_Toolbox_StringRequest { ^ symbol: class Com_Android_VolleyToolbox

StringRequest ./build/Development-16/java/com/your_company/myapp/Request.java:49: error: package com.android.volley does not exist protected java.util.Map<java.lang.String,java.lang.String> getParams() throws com.android.volley.AuthFailureError { ^ ./build/Development-16/java/com/your_company/myapp/Request.java:54: error: package com.android.volley does not exist public java.util.Map<java.lang.String,java.lang.String> getHeaders() throws com.android.volley.AuthFailureError { ^ ./build/Development-16/java/com/your_company/myapp/Request.java:48: error: method does not override or implement a method from a supertype @Override ^ 3 warnings ./build/Development-16/java/com/your_company/myapp/Request.java:53: error: method does not override or implement a method from a supertype @Override ^

My java and javac:

KC:myapp$ java -version java version "1.8.0_60-ea" Java(TM) SE Runtime Environment (build 1.8.0_60-ea-b19) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b19, mixed mode) KC:myapp$ javac -version javac 1.8.0_60-ea

I'll try downgrading back to jdk6, but I don't think that's the issue, because my non-bluepotion apps are still fine.

— Reply to this email directly or view it on GitHub https://github.com/infinitered/bluepotion/issues/28#issuecomment-113606307 .

KCErb commented 9 years ago

Sure thing, here's a gist.

darinwilson commented 9 years ago

Ok - it looks like you need to install Gradle. I think it's as simple as brew install gradle but check the docs on the main motion-gradle site:

https://github.com/HipByte/motion-gradle

Are you enjoying our alpha-level documentation? ;-)

On Fri, Jun 19, 2015, 12:38 PM KC Erb notifications@github.com wrote:

Sure thing, here's a gist https://gist.github.com/KCErb/75fd2d523a2bf9771ac5.

— Reply to this email directly or view it on GitHub https://github.com/infinitered/bluepotion/issues/28#issuecomment-113617266 .

KCErb commented 9 years ago

Yes it works, and yes alpha is where the parties are :tada:

Thanks all!