struggling with setting up android studio

675 views
Skip to first unread message

Daisy

unread,
Oct 9, 2016, 10:30:55 AM10/9/16
to Blockly
Sorry for asking a silly question. I was trying to set up my android studio so I can use Blockly in my app. I got the code from GitHub but I can't find blocklylib-debug.aar or blocklylib-release.aar in it. Where can I find them? 

Thanks!!

Andrew n marshall

unread,
Oct 9, 2016, 10:41:23 AM10/9/16
to blo...@googlegroups.com
Hi Daisy,

We are not distributing binaries at this time.  You will need to build the project you downloaded from GitHub first.

First, open the project using the Import Project option (under File | New), navigate to the directory you downloaded.  Once open, build either blocklydemo or blocklylib-vertical. Both have a dependency on blocklylib-core.  Once built, you will use the following library files for your application:

blockly-android/blocklylib-core/build/outputs/aar/blocklylib-core-release.aar
blockly-android/blocklylib-core/build/outputs/aar/blocklylib-core-debug.aar
blockly-android/blocklylib-vertical/build/outputs/aar/blocklylib-vertical-release.aar
blockly-android/blocklylib-vertical/build/outputs/aar/blocklylib-vertical-debug.aar

Hope that helps.
On Sun, Oct 9, 2016 at 7:30 AM, Daisy <daysi...@gmail.com> wrote:
Sorry for asking a silly question. I was trying to set up my android studio so I can use Blockly in my app. I got the code from GitHub but I can't find blocklylib-debug.aar or blocklylib-release.aar in it. Where can I find them? 

Thanks!!

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daisy

unread,
Oct 10, 2016, 10:45:36 AM10/10/16
to Blockly
Thanks Andrew it really helps!

But I have another problem now. I was trying to do the final step in the Get Started guide: change the theme to @style/BlocklyTheme but it gave me an error. is there anything I should do before I change the theme? I tried to remain it to @style/AppTheme and the app was not running.

Thank you very much!!
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.

Andrew n marshall

unread,
Oct 10, 2016, 1:16:28 PM10/10/16
to blo...@googlegroups.com
Thanks, Daisy.  It seems you've found an error in my documentation.  Try using...

android:theme="@style/BlocklyVerticalTheme"

I'll update the docs today.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
Message has been deleted
Message has been deleted

Daisy

unread,
Oct 10, 2016, 7:06:01 PM10/10/16
to Blockly
Thanks Andrew! I tried that and it gives me this error message:

Cannot resolve symbol '@style/BlocklyVerticalTheme' less... (Ctrl+F1)
Validates resource references inside Android XML files.     

I tried to search "BlocklyVerticalTheme" in my project and I found it was mentioned in a Java file named C:\Users\Daisy\Downloads\BlocklyTest\app\build\generated\source\r\debug\com\example\daisy\blocklytest\R.java, I don't know will this help...

How can I fix this? Thank you very much!!

Andrew n marshall

unread,
Oct 11, 2016, 11:57:21 AM10/11/16
to blo...@googlegroups.com
Hi Daisy,

Have you added the blocklylib-vertical-core.aar or blocklylib-vertical-debug.aar files to your project as a dependency?


That said, the following is a better solution:

In your app's res/values/styles.xml, set style AppTheme to have BlocklyVerticalTheme as the parent.

<style name="AppTheme" parent="BlocklyVerticalTheme">

Leave the AndroidManifest.xml in its original state, referencing AppTheme:

<activty ... android:theme="@style/AppTheme" >


The updated "Get Started" page should be out today.

To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Daisy

unread,
Oct 11, 2016, 8:19:13 PM10/11/16
to Blockly
Thanks Andrew and sorry for bothering you with this for days...

I did add blocklylib-vertical-debug.aar files to my project as a module dependency. And it is still not working...
The following are the steps I did from the start of the whole thing and the error messages, hope this will help to find what did I do wrongly...
  1. Downlaod codes of Blockly from GitHub
  2. Unzip the file download from GitHub

  3. Import project blockly-android-master

  4. Build --> make module “blocklydemo”

  5. Close project blockly-android-master

  6. Open new project BlocklyTest

  7. Create empty activity without xml

  8. Add android:windowSoftInputMode="stateHidden|adjustPan" to <activity> of AndroidManifest.xml

  9. Change the parent theme to BlocklyVerticalTheme of AppTheme in styles.xml

  10. File --> project structure --> app --> dependencies

  11. Add library dependencies: com.android.support:support-v4:24.2.1

  12. Add library dependencoes: com.android.support:recyclerview-v7:24.2.1

  13. Add library dependencies: com.android.support:appcompat-v7:24.2.1

  14. File --> project structure --> create new module --> import .jar/.aar package

  15. Import blocklylib-core-debug

  16. Repeat step 8 but import blocklylib-core-release

  17. Repeat step 8 but import blocklylib-vertical-debug

  18. Repeat step 8 but import blocklylib-vertical-release

  19. Add module dependencies blocklylib-vertical-debug

Error generated after step 9:

Cannot resolve symbol 'BlocklyVerticalTheme' less... (Ctrl+F1)

Validates resource references inside Android XML files

 

Error generated after step 19:

Error:(1353) Error retrieving parent for item: No resource found that matches the given name 'BlocklyTheme'.

Error:(1353) Error retrieving parent for item: No resource found that matches the given name 'BlocklyTheme'.

Error:Execution failed for task ':app:processDebugResources'.

> com.android.ide.common.process.ProcessException: Failed to execute aapt



I am sorry to bother you for so many days with this and I really appreciate that, thank you very much!!!

Sapna Salian

unread,
Aug 2, 2017, 11:22:07 PM8/2/17
to Blockly
Hi, I am facing similar problem too. It would be gr8 if we could get a solution.
Thanks,
Sapna

Andrew n marshall

unread,
Aug 2, 2017, 11:39:48 PM8/2/17
to blo...@googlegroups.com

Hi Sapna,

Which specific problem are you having trouble with.  In the prior case, the project did not have the completed dependency configuration.  Make sure you are able to download and build the library, and then follow all the steps in our Getting Started guide.


To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Sapna Salian

unread,
Aug 3, 2017, 12:36:24 AM8/3/17
to Blockly
Hi Andrew, I have followed all the steps in the Getting Started guide.
But I am also getting an error when I set the parent to 
BlocklyVerticalTheme

t says Error retrieving parent for item: No resources found that matches the given name 'BlocklyVerticalTheme'
Also in my java file I get an error msg when I replace AppCompatActivity with AbstractBlocklyActivity(it says it cannot resolve symbol.

Thanks,
Sapna

Andrew n marshall

unread,
Aug 3, 2017, 12:43:34 AM8/3/17
to blo...@googlegroups.com
It sounds like the dependency to blocklylib-vertical is not configured correctly. Can you send me a screen shot of your application's dependencies, from the project structure configuration?

To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Sapna Salian

unread,
Aug 3, 2017, 12:53:06 AM8/3/17
to Blockly
Hi Andrew, I have sent you the screenshots, hope you have received it.

Thanks,
Sapna

Sapna Salian

unread,
Aug 3, 2017, 2:17:34 AM8/3/17
to Blockly
Hi Andrew,

I have resent the screenshot as requested.

Thanks,
Sapna

Sapna Salian

unread,
Aug 3, 2017, 8:34:16 PM8/3/17
to Blockly
Please check my mail.

Thanks.

Sapna Salian

unread,
Aug 3, 2017, 9:10:49 PM8/3/17
to Blockly
Hi Andrew,

I have already done the necessary steps for adding dependencies. But somehow the dependencies disappear once I click on the OK button.

I have followed the steps again and have taken screenshots. Please refer to your mail for the screenshots.

Thanks,
Sapna

Andrew n marshall

unread,
Aug 4, 2017, 2:52:46 PM8/4/17
to blo...@googlegroups.com
The disappearing dependencies sounds like a critical problem, and not one I know anything about.

If you get that figured out, try forcing a clean build from the Build menu. That worked for another user.

To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Sapna Salian

unread,
Aug 6, 2017, 8:16:16 PM8/6/17
to Blockly
Hi Andrew,
Thanks for your reply. Could you please provide the steps for forcing a clean build. Thanks.

Sapna Salian

unread,
Aug 7, 2017, 8:22:52 PM8/7/17
to Blockly
Hi Andrew,

As mentioned in your last mail, that there was another user who forced a clean build and it worked for them, Did they have the same issue of disappearing dependencies as I did?

Thanks.

Andrew n marshall

unread,
Aug 7, 2017, 9:42:25 PM8/7/17
to blo...@googlegroups.com
You're the only person who has mentioned any such problem.  Of course, I wouldn't have even noticed if it wasn't for the screenshot you sent off list.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Sapna Salian

unread,
Aug 7, 2017, 10:35:20 PM8/7/17
to Blockly
So would you be able to guide me with how to go forward with this issue?

Andrew n marshall

unread,
Aug 8, 2017, 3:58:43 PM8/8/17
to blo...@googlegroups.com
These options in the build menu.

Considering how proactive Android Studio is to make a project build, they are largely equivalent in practice. (I.e., clean projects don't stay clean very long.)

To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Sapna Salian

unread,
Aug 8, 2017, 9:24:55 PM8/8/17
to Blockly
Thanks Andrew.
But is still doesn't work for me.

Andrew n marshall

unread,
Aug 9, 2017, 10:36:40 AM8/9/17
to blo...@googlegroups.com
I'm sorry.  I can't provide support for Android Studio and your missing dependencies issue. I strongly recommend rebuilding the project, adding each dependency one at a time, fully exiting the Project Structure dialog between each addition. At the end, do a clean build.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.

Sapna Salian

unread,
Aug 9, 2017, 9:23:55 PM8/9/17
to Blockly
Hi Andrew,

I have tried all the steps suggested by you. Unfortunately, it doesn't work for me. Anyways, thanks for the Support. Do let me know if you come across any solution for this problem in the future.

Thanks,
Sapna
Reply all
Reply to author
Forward
0 new messages