I have successfully generated Android library file(.aar) from IONIC/Cordova application to reuse the third party application. But while running the third party app, getting Class not found exception
for all Cordova plugins.
Can any one tell the method to declare all the plugin dependencies in other Android app?
build.gradle file in Third party app
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
flatDir {
dirs 'libs'
}
}
}
dependencies{
implementation files('libs/android-debug.aar')
implementation files('libs/cordova.jar')
implementation fileTree(dir: 'libs', include: ['*.jar, *.aar'])
}
MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = intent = new Intent(this, com.sd.app.MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(intent);
}
}
1 post - 1 participant