I report this on an extension alredy builded with appy builder editor
Compiling Java files
│
│ │
│ ERR src\com\chiccovision\magnifier\Magnifier.java:33: error: cannot find symbol
│ import com.google.appinventor.components.common.YaVersion;
│ ^
│ symbol: class YaVersion
│ location: package com.google.appinventor.components.common
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:43: error: cannot find symbol
│ import com.google.appinventor.components.annotations.DesignerComponent;
│ ^
│ symbol: class DesignerComponent
│ location: package com.google.appinventor.components.annotations
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:48: error: cannot find symbol
│ import com.google.appinventor.components.annotations.SimpleObject;
│ ^
│ symbol: class SimpleObject
│ location: package com.google.appinventor.components.annotations
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:50: error: cannot find symbol
│ import com.google.appinventor.components.annotations.UsesPermissions;
│ ^
│ symbol: class UsesPermissions
│ location: package com.google.appinventor.components.annotations
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:53: error: cannot find symbol
│ import com.google.appinventor.components.common.YaVersion;
│ ^
│ symbol: class YaVersion
│ location: package com.google.appinventor.components.common
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:64: error: cannot find symbol
│ @DesignerComponent (version = 1, description = “This Extension was created with the AppyBuilder Code Editor. ” +
│ ^
│ symbol: class DesignerComponent
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:68: error: cannot find symbol
│ @SimpleObject (external = true)
│ ^
│ symbol: class SimpleObject
│
│ ERR src\com\chiccovision\magnifier\Magnifier.java:69: error: cannot find symbol
│ @UsesPermissions (permissionNames = “android.permission.WRITE_EXTERNAL_STORAGE, android.permission.READ_EXTERNAL_STORAGE,android.permission.INTERNET”)
│ ^
│ symbol: class UsesPermissions
│ warning: The following options were not recognized by any processor: ‘[output, org, root, version, extName]’
│
│ Total warnings: 1
│ Total errors: 8
└ Failed
• Build failed
Shreyash
(Shreyash Saitwal)
March 27, 2021, 10:06am
#135
Rush doesn’t support annotations like DesignerComponent and UsesPermissions, instead you need to define your extension’s metadata in the metadata file – rush.yml
; and Android manifest elements, like required permissions, in the AndroidManifest.xml
.
This is explained in detail here
Shreyash:
How’s Rush different?
If you take a look at the generated Java file for your extension (which you can find in src → package ), you’ll find that there are no DesignerComponent
and SimpleObject
annotations in there. In fact, there is not a single class-level annotation. So, where did all these annotations go?
PS: You also don’t need to define the SimpleObject annotation, Rush automatically detects your extension’s Java class while compiling.
3 Likes
I seen solved thanks.
Great Job,Congratulation
1 Like
How to add dependency ?? any example.
Shreyash
(Shreyash Saitwal)
March 28, 2021, 5:40pm
#138
To add an external library (JAR) to your extension,
Download your desired JAR from the internet.
Then, copy it into the deps
directory.
Finally, in rush.yml
, add a new entry, with the exact same name of your JAR file which you copied into the deps directory, to the deps
field. For example:deps:
- my-library.jar
3 Likes
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
and here the module for the app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "com.ozetastudios.climbbuddy"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
like this
Shreyash
(Shreyash Saitwal)
March 28, 2021, 5:47pm
#140
Sorry, I’m unable to understand what you’re trying to say. Please elaborate more instead of just pasting irrelevant stuff.
i want to know the coding how to use show us an example, an example ( my_awesome_library) file coding, what what coding we should use there.
Shreyash
(Shreyash Saitwal)
March 28, 2021, 5:54pm
#142
Did you read this post of mine
To add an external library (JAR) to your extension,
Download your desired JAR from the internet.
Then, copy it into the deps directory.
Finally, in rush.yml, add a new entry, with the exact same name of your JAR file which you copied into the deps directory, to the deps field. For example:deps:
- my-library.jar
ok i did, but geting some error
Jar file is java zip file…similar file is AAr file… as it is an ofline builder you will have to manually implement the external library in… deps…folder…still any 1 can provide demo project or project link please provide…
Shreyash
(Shreyash Saitwal)
March 29, 2021, 4:53am
#146
MJ_BUNNY_T.V:
but geting some error
Please be a bit more specific. What error(s) do you see?
Just for testing purposes …i try wit fb sdk
Shreyash
(Shreyash Saitwal)
March 29, 2021, 5:07am
#148
Your deps field isn’t correctly indented. There should be exactly 2 spaces before - YourLibrary.jar
.
PS: AAR libraries aren’t yet supported by extensions. See this post .
PS-2: Ad extensions aren’t allowed in Kodular. You can get your community as well as creator account suspended if you use and/or distribute them.
i know but as i say just for testing purpose only. And i am in just learning stage in extension.
appmake
(appmake)
April 4, 2021, 4:02pm
#150
Exception in thread “main” java.lang.NullPointerException
│ at java.io.StringReader.(StringReader.java:50)
│ at shaded.org.json.JSONTokener.(JSONTokener.java:94)
│ at shaded.org.json.JSONArray.(JSONArray.java:162)
│ at io.shreyash.rush.ExtensionGenerator.main(ExtensionGenerator.java:50)
│ Picked up _JAVA_OPTIONS: -Xmx1024m
Shreyash
(Shreyash Saitwal)
April 4, 2021, 4:07pm
#151
Make sure you:
are not creating (and building) your extension in the directory where you’ve unzipped rush-win64.zip
,
have JDK version 8 or above installed, and
have JAVA_HOME
path variable defined.
PS: Looking at the screenshot you posted, you seem to be creating an ad extension. Ad extensions are neither allowed nor they work in Kodular. You might get in trouble if found using and/or distributing them.
1 Like
appmake
(appmake)
April 4, 2021, 4:38pm
#152
C:\Program Files\Java\jdk1.8.0_131\bin
Shreyash
(Shreyash Saitwal)
April 4, 2021, 4:45pm
#153
The value of JAVA_HOME
should be C:\Program Files\Java\jdk1.8.0_131
.